From 14c3deb7f9c76895b6929e7fc9c8536340df15fa Mon Sep 17 00:00:00 2001 From: ngie Date: Sat, 31 Dec 2016 10:40:59 +0000 Subject: [PATCH] MFstable/11 r310909: MFC r310500,r310660: r310500: Minor style(9) fixes - Trailing whitespace cleanup - Sort variables in snmp_dialog(..) by alignment No functional change r310660: style(9): fix whitespace in pdu_encode_secparams(..) git-svn-id: svn://svn.freebsd.org/base/stable/10@310910 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/bsnmp/lib/snmp.c | 4 ++-- contrib/bsnmp/lib/snmpclient.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/bsnmp/lib/snmp.c b/contrib/bsnmp/lib/snmp.c index 339853bc3..64792a9c6 100644 --- a/contrib/bsnmp/lib/snmp.c +++ b/contrib/bsnmp/lib/snmp.c @@ -355,8 +355,8 @@ static enum snmp_code pdu_encode_secparams(struct asn_buf *b, struct snmp_pdu *pdu) { u_char buf[256], *sptr; - struct asn_buf tb; - size_t auth_off, moved = 0; + struct asn_buf tb; + size_t auth_off, moved = 0; auth_off = 0; memset(buf, 0, 256); diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c index 54ab9e3bc..78b3d5dc9 100644 --- a/contrib/bsnmp/lib/snmpclient.c +++ b/contrib/bsnmp/lib/snmpclient.c @@ -1214,7 +1214,7 @@ snmp_next_reqid(struct snmp_client * c) int32_t i; i = c->next_reqid; - if (c->next_reqid >= c->max_reqid) + if (c->next_reqid >= c->max_reqid) c->next_reqid = c->min_reqid; else c->next_reqid++; @@ -1230,7 +1230,7 @@ snmp_send_packet(struct snmp_pdu * pdu) u_char *buf; struct asn_buf b; ssize_t ret; - + if ((buf = malloc(snmp_client.txbuflen)) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); return (-1); @@ -1684,9 +1684,9 @@ snmp_dialog(struct snmp_v1_pdu *req, struct snmp_v1_pdu *resp) struct timeval tv = snmp_client.timeout; struct timeval end; struct snmp_pdu pdu; - u_int i; - int32_t reqid; int ret; + int32_t reqid; + u_int i; /* * Make a copy of the request and replace the syntaxes by NULL -- 2.45.0