]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r299710,r299711,r299763,r299783,r299811:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 May 2016 06:01:04 +0000 (06:01 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 23 May 2016 06:01:04 +0000 (06:01 +0000)
commitc1049d2b52bf82110405a87fa6ce5a2ebff2e91b
tree8f22035f02c3f7280c6995ecccf8ea592427ee23
parenta17c0b3b4a0c4efd4bc9216b85dbbe6b7e69d1ba
MFC r299710,r299711,r299763,r299783,r299811:

r299710:

Staticize global variables only used in bsnmpimport.c to fix
-Wmissing-variable-declarations warnings

r299711:

Fold two malloc + memset(.., 0, ..) calls into equivalent calloc calls

r299763:

Mute -Wstrlcpy-strlcat-size warning by using nitems with the size of the buffer

This is a no-op as the malloc above set the size of the buffer to the size used
below, but this keeps things consistent in case the malloc call changes somehow.

r299783:

Convert tok from enum tok to int32_t in function calls

get_token(..) returns int32_t, not enum tok, and in many cases tests for items
not in enum tok (e.g. '('). Make the typing consistent with get_token, which
includes a domino effect of changing enum tok to int32_t.

r299811:

Use strdup instead of malloc + strlcpy

Fix error messages on failure for calloc/strdup

git-svn-id: svn://svn.freebsd.org/base/stable/10@300475 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c