瀏覽代碼

Remove unchecked return error

Signed-off-by: Steven Dake <sdake@redhat.com>
Steven Dake 14 年之前
父節點
當前提交
f601c73436
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      cts/agents/sam_test_agent.c

+ 6 - 1
cts/agents/sam_test_agent.c

@@ -496,10 +496,15 @@ static int test4 (void)
 
 static int test5_hc_cb (void)
 {
+	cs_error_t res;
+
 	syslog (LOG_INFO, "%s %d\n", __FUNCTION__, ++test5_hc_cb_count);
 
-	sam_data_store (&test5_hc_cb_count, sizeof (test5_hc_cb_count));
+	res = sam_data_store (&test5_hc_cb_count, sizeof (test5_hc_cb_count));
 
+	if (res != CS_OK)
+		return 1;
+	
 	if (test5_hc_cb_count > 10)
 		return 1;