From: Eyal Shapira Date: Thu, 15 Mar 2012 19:21:07 +0000 (+0200) Subject: nl80211: fix warnings X-Git-Url: https://git.ti.com/gitweb?p=build-utilities%2Fhostap.git;a=commitdiff_plain;h=68e92704d1f0561cab96db7edfeee280782613e6 nl80211: fix warnings fopen returns a file pointer and not an int --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index fd9b082a..4a04402c 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -8981,7 +8981,7 @@ static int nl80211_toggle_dropbcast(int enable) snprintf(filename, sizeof(filename) - 1, "/sys/bus/platform/devices/wl12xx/drop_bcast"); f = fopen(filename, "w"); - if (f < 0) { + if (!f) { wpa_printf(MSG_DEBUG, "Could not open file %s: %s", filename, strerror(errno)); return -1;