diff options
author | 2020-08-02 20:14:10 +0000 | |
---|---|---|
committer | 2020-08-02 20:14:10 +0000 | |
commit | f2fa7a920d8fe6139ebbc844b478cbde316c4836 (patch) | |
tree | 40991a64fd58cd5339ed98266f5439abfe21e71e | |
parent | The difference between vgone(9) and vgonel(9) has changed after the (diff) | |
download | wireguard-openbsd-f2fa7a920d8fe6139ebbc844b478cbde316c4836.tar.xz wireguard-openbsd-f2fa7a920d8fe6139ebbc844b478cbde316c4836.zip |
missing {} identified by clang10
ok martijn
-rw-r--r-- | usr.bin/snmp/snmp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/snmp/snmp.c b/usr.bin/snmp/snmp.c index 901f403955a..2b955338cb9 100644 --- a/usr.bin/snmp/snmp.c +++ b/usr.bin/snmp/snmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snmp.c,v 1.10 2020/03/24 14:09:14 martijn Exp $ */ +/* $OpenBSD: snmp.c,v 1.11 2020/08/02 20:14:10 deraadt Exp $ */ /* * Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org> @@ -157,10 +157,11 @@ snmp_get(struct snmp_agent *agent, struct ber_oid *oid, size_t len) if ((varbind = ober_printf_elements(pdu, "tddd{", BER_CLASS_CONTEXT, SNMP_C_GETREQ, arc4random() & 0x7fffffff, 0, 0)) == NULL) goto fail; - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { varbind = ober_printf_elements(varbind, "{O0}", &oid[i]); if (varbind == NULL) goto fail; + } return snmp_resolve(agent, pdu, 1); fail: @@ -179,10 +180,11 @@ snmp_getnext(struct snmp_agent *agent, struct ber_oid *oid, size_t len) if ((varbind = ober_printf_elements(pdu, "tddd{", BER_CLASS_CONTEXT, SNMP_C_GETNEXTREQ, arc4random() & 0x7fffffff, 0, 0)) == NULL) goto fail; - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { varbind = ober_printf_elements(varbind, "{O0}", &oid[i]); if (varbind == NULL) goto fail; + } return snmp_resolve(agent, pdu, 1); fail: @@ -238,10 +240,11 @@ snmp_getbulk(struct snmp_agent *agent, struct ber_oid *oid, size_t len, SNMP_C_GETBULKREQ, arc4random() & 0x7fffffff, non_repeaters, max_repetitions)) == NULL) goto fail; - for (i = 0; i < len; i++) + for (i = 0; i < len; i++) { varbind = ober_printf_elements(varbind, "{O0}", &oid[i]); if (varbind == NULL) goto fail; + } return snmp_resolve(agent, pdu, 1); fail: |