]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix strerror() value in P2P Dev debug messages
authorJouni Malinen <j@w1.fi>
Sat, 26 Oct 2013 08:53:02 +0000 (11:53 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 26 Oct 2013 12:55:18 +0000 (15:55 +0300)
send_and_recv_msgs() returns negative errno, so need to use -ret in the
strerror() call.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/drivers/driver_nl80211.c

index a1155ce652afc4a1f797c1b309a1aed66cdad759..e559858d7137826d716228f67f0b2864e9f68d50 100644 (file)
@@ -4004,7 +4004,7 @@ static void nl80211_del_p2pdev(struct i802_bss *bss)
 
        wpa_printf(MSG_DEBUG, "nl80211: Delete P2P Device %s (0x%llx): %s",
                   bss->ifname, (long long unsigned int) bss->wdev_id,
-                  strerror(ret));
+                  strerror(-ret));
 
 nla_put_failure:
        nlmsg_free(msg);
@@ -4034,7 +4034,7 @@ static int nl80211_set_p2pdev(struct i802_bss *bss, int start)
        wpa_printf(MSG_DEBUG, "nl80211: %s P2P Device %s (0x%llx): %s",
                   start ? "Start" : "Stop",
                   bss->ifname, (long long unsigned int) bss->wdev_id,
-                  strerror(ret));
+                  strerror(-ret));
 
 nla_put_failure:
        nlmsg_free(msg);