[PATCH 1/1] STA: Fix nl_recvmsgs error print

Jithu Jance jithu
Thu May 22 03:04:57 PDT 2014


Print error only on negative return values.

Signed-off-by: Jithu Jance <jithu at broadcom.com>
---
 src/drivers/driver_nl80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 709e13a..10a639c 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -652,7 +652,7 @@ static int send_and_recv(struct nl80211_global *global,

 	while (err > 0) {
 		int res = nl_recvmsgs(nl_handle, cb);
-		if (res) {
+		if (res < 0) {
 			wpa_printf(MSG_INFO,
 				   "nl80211: %s->nl_recvmsgs failed: %d",
 				   __func__, res);
--
1.7.9.5




More information about the Hostap mailing list