mini_snmpd: fix the size argument to memset (#13764)
Building with gcc-4.8 spotted this memset size argument misuse, fix this. Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/packages@39901 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
11
net/mini_snmpd/patches/104-memset_fix.patch
Normal file
11
net/mini_snmpd/patches/104-memset_fix.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/mini_snmpd.c
|
||||
+++ b/mini_snmpd.c
|
||||
@@ -443,7 +443,7 @@ int main(int argc, char *argv[])
|
||||
/* Store the starting time since we need it for MIB updates */
|
||||
if (gettimeofday(&tv_last, NULL) == -1) {
|
||||
memset(&tv_last, 0, sizeof (tv_last));
|
||||
- memset(&tv_sleep, 0, sizeof (&tv_sleep));
|
||||
+ memset(&tv_sleep, 0, sizeof (tv_sleep));
|
||||
} else {
|
||||
tv_sleep.tv_sec = g_timeout / 100;
|
||||
tv_sleep.tv_usec = (g_timeout % 100) * 10000;
|
Reference in New Issue
Block a user