From c3f095c6dab8b711eaf24878ca8369ca81ae01a6 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 28 Dec 2016 08:11:41 +0000 Subject: [PATCH] Fix the build by moving the initializers for len/nswapdev down below the declarations MFC after: 3 days Pointyhat to: ngie --- usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c index 12d1300c198d..f7b6537c289d 100644 --- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c +++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c @@ -376,8 +376,11 @@ storage_OS_get_swap(void) { struct storage_entry *entry; char swap_w_prefix[SE_DESC_MLEN]; - size_t len = sizeof(nswapdev); - int nswapdev = 0; + size_t len; + int nswapdev; + + len = sizeof(nswapdev); + nswapdev = 0; if (sysctlbyname("vm.nswapdev", &nswapdev, &len, NULL,0 ) < 0) { syslog(LOG_ERR,