Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Dec 2016 05:36:04 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310203 - head/usr.sbin/bsnmpd/tools/bsnmptools
Message-ID:  <201612180536.uBI5a4Ci091012@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sun Dec 18 05:36:04 2016
New Revision: 310203
URL: https://svnweb.freebsd.org/changeset/base/310203

Log:
  Clean up parse_ip(..)
  
  - Clean up trailing whitespace
  - Fix variable alignment
  
  MFC after:	1 week

Modified:
  head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c

Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c
==============================================================================
--- head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c	Sun Dec 18 05:31:54 2016	(r310202)
+++ head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c	Sun Dec 18 05:36:04 2016	(r310203)
@@ -603,9 +603,9 @@ parse_oid_string(struct snmp_toolinfo *s
 static int32_t
 parse_ip(struct snmp_value * value, char * val)
 {
-	uint32_t v;
-	int32_t i;
 	char *endptr, *str;
+	int32_t i;
+	uint32_t v;
 
 	str = val;
 	for (i = 0; i < 4; i++) {
@@ -617,8 +617,8 @@ parse_ip(struct snmp_value * value, char
 		str = endptr + 1;
 		value->v.ipaddress[i] = (uint8_t) v;
 	}
-
 	value->syntax = SNMP_SYNTAX_IPADDRESS;
+
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612180536.uBI5a4Ci091012>