From 6cb4f11dba48c5703f064a1b17e2391d8eba0e49 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 26 Oct 2013 11:53:02 +0300 Subject: [PATCH] nl80211: Fix strerror() value in P2P Dev debug messages send_and_recv_msgs() returns negative errno, so need to use -ret in the strerror() call. Signed-hostap: Jouni Malinen --- src/drivers/driver_nl80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index a1155ce65..e559858d7 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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);