summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-04-15 18:37:30 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-04-15 18:37:30 +0200
commitbc214ca470015b12a4f905f57ba6f2352c60f5a5 (patch)
tree018b68610cba826936d376743cda278e0071c7e6
parent8520d78a52e04af6396b379dfe6aa47861ca2e13 (diff)
system-linux: fix system_rtnl_call() return code
-rw-r--r--system-linux.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/system-linux.c b/system-linux.c
index 66799e9..5b217cf 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -243,10 +243,15 @@ handle_hotplug_event(struct uloop_fd *u, unsigned int events)
static int system_rtnl_call(struct nl_msg *msg)
{
- int s = -(nl_send_auto_complete(sock_rtnl, msg)
- || nl_wait_for_ack(sock_rtnl));
+ int ret;
+
+ ret = nl_send_auto_complete(sock_rtnl, msg);
nlmsg_free(msg);
- return s;
+
+ if (ret < 0)
+ return ret;
+
+ return nl_wait_for_ack(sock_rtnl);
}
int system_bridge_delbr(struct device *bridge)