Fix build warnings 87/183687/1
authorjusung son <jusung07.son@samsung.com>
Tue, 10 Jul 2018 04:38:37 +0000 (13:38 +0900)
committerjusung son <jusung07.son@samsung.com>
Tue, 10 Jul 2018 04:38:37 +0000 (13:38 +0900)
Change-Id: I74aaa00842ed010732bc8dd7f30f7ef316622e7c
Signed-off-by: jusung son <jusung07.son@samsung.com>
client/c_direct.c
daemon/daemon.c

index d7343cc..73dab8c 100644 (file)
@@ -168,7 +168,9 @@ static void _write_file_log(const char *key, const char *value)
 
        fd = open(buf, O_RDONLY);
        if (fd >= 0) {
-               read(fd, app_id, sizeof(app_id) - 1);
+               ret = read(fd, app_id, sizeof(app_id) - 1);
+               if (ret < 0)
+                       bxt_err("Cannot read %s: %d", buf, errno);
                close(fd);
        }
 
index 090ef5d..698ca83 100644 (file)
@@ -902,7 +902,9 @@ static gboolean client_cb(gint fd, GIOCondition cond, gpointer data)
 
                proc_fd = open(buf, O_RDONLY);
                if (proc_fd >= 0) {
-                       read(proc_fd, proc_name, sizeof(proc_name) - 1);
+                       r = read(proc_fd, proc_name, sizeof(proc_name) - 1);
+                       if (r < 0)
+                               bxt_err("Cannot read %s: %d", buf, errno);
                        close(proc_fd);
 
                        if (strlen(proc_name) > 0)