]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Get rid of unused assignment warning
authorJouni Malinen <j@w1.fi>
Sun, 17 Apr 2016 15:43:30 +0000 (18:43 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 17 Apr 2016 15:43:30 +0000 (18:43 +0300)
The os_snprintf() call here cannot really fail in practice, but since
its result was stored into the local variable and not checked, static
analyzers could warn about the unused assignment. Clean this up by
checking the return value.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c

index 0dab4bdb86acdc1e4761cbb7ff0d95c2ea6edfa3..7e8d5796745a674a9fe164907f30edf0c279a1cb 100644 (file)
@@ -9101,6 +9101,8 @@ static int nl80211_configure_data_frame_filters(void *priv, u32 filter_flags)
        ret = os_snprintf(path, sizeof(path),
                          "/proc/sys/net/ipv4/conf/%s/drop_unicast_in_l2_multicast",
                          bss->ifname);
+       if (os_snprintf_error(sizeof(path), ret))
+               return -1;
 
        ret = nl80211_write_to_file(path,
                                    !!(filter_flags &