aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-04-17 15:43:30 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-17 15:43:30 (GMT)
commitbd86ea0808f1b1cc573ae81277612577c4651046 (patch)
treed37d7abf5cbcf0ac888ee365fa89e4f1d5ded6e2
parent18ae3a675cd56ebcf476c232c603dd6da31e8441 (diff)
downloadhostap-bd86ea0808f1b1cc573ae81277612577c4651046.zip
hostap-bd86ea0808f1b1cc573ae81277612577c4651046.tar.gz
hostap-bd86ea0808f1b1cc573ae81277612577c4651046.tar.bz2
nl80211: Get rid of unused assignment warning
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>
-rw-r--r--src/drivers/driver_nl80211.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 0dab4bd..7e8d579 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -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 &