Handle return values of system calls
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 14 Jan 2008 05:11:57 +0000 (06:11 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 14 Jan 2008 05:11:57 +0000 (06:11 +0100)
plugins/supplicant.c
src/iface.c

index e58415c..de74ce5 100644 (file)
@@ -64,9 +64,7 @@ static struct supplicant_task *find_task(int ifindex)
 
 static int exec_cmd(struct supplicant_task *task, char *cmd)
 {
-       write(task->socket, cmd, strlen(cmd));
-
-       return 0;
+       return write(task->socket, cmd, strlen(cmd));
 }
 
 static gboolean control_event(GIOChannel *chan,
index 2c7fdfe..a6b0ba2 100644 (file)
@@ -252,7 +252,7 @@ int connman_iface_set_ipv4(struct connman_iface *iface,
 
        DBG("%s", cmd);
 
-       system(cmd);
+       err = system(cmd);
 
        return 0;
 }
@@ -301,7 +301,7 @@ int connman_iface_clear_ipv4(struct connman_iface *iface)
 
        DBG("%s", cmd);
 
-       system(cmd);
+       err = system(cmd);
 
        return 0;
 }