nl80211: fix warnings
authorEyal Shapira <eyal@wizery.com>
Thu, 15 Mar 2012 19:21:07 +0000 (21:21 +0200)
committerEyal Shapira <eyal@wizery.com>
Thu, 15 Mar 2012 19:21:07 +0000 (21:21 +0200)
fopen returns a file pointer and not an int

src/drivers/driver_nl80211.c

index fd9b082a2940f4f0964611f605c5e7fa8fea0bdd..4a04402c20e5533c1ea02c197bb78bb3691f6708 100644 (file)
@@ -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;