From 88be168553c2345349c614fbf7a208a32d0ca970 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 14 Jan 2008 06:11:57 +0100 Subject: [PATCH] Handle return values of system calls --- plugins/supplicant.c | 4 +--- src/iface.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/supplicant.c b/plugins/supplicant.c index e58415c..de74ce5 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -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, diff --git a/src/iface.c b/src/iface.c index 2c7fdfe..a6b0ba2 100644 --- a/src/iface.c +++ b/src/iface.c @@ -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; } -- 2.7.4