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 d7343ccd4963f9551fbbc906d44a3250fe622cf0..73dab8cd3c16a18a2b9bb79e21411b96c5a0c513 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 090ef5d778165ef569e59b34e1b052bdd0607d5f..698ca83ca52403ac083cf42f29cb4271a4f3ab85 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)