summaryrefslogtreecommitdiffstats
path: root/usr.bin/snmp
diff options
context:
space:
mode:
authorsemarie <semarie@openbsd.org>2019-10-03 07:23:46 +0000
committersemarie <semarie@openbsd.org>2019-10-03 07:23:46 +0000
commitcf9b7475277a7c1dda2a6ebeaafaf9c9bec4d238 (patch)
treed0338c4d2b3e2747d3abafe6751e2ca5cb40f058 /usr.bin/snmp
parentremove useless check and dead code (diff)
downloadwireguard-openbsd-cf9b7475277a7c1dda2a6ebeaafaf9c9bec4d238.tar.xz
wireguard-openbsd-cf9b7475277a7c1dda2a6ebeaafaf9c9bec4d238.zip
use the right argv element for the error message.
ok martijn@
Diffstat (limited to 'usr.bin/snmp')
-rw-r--r--usr.bin/snmp/snmpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/snmp/snmpc.c b/usr.bin/snmp/snmpc.c
index f8462c8d0e0..a1eb10ccc02 100644
--- a/usr.bin/snmp/snmpc.c
+++ b/usr.bin/snmp/snmpc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snmpc.c,v 1.11 2019/09/18 09:54:36 martijn Exp $ */
+/* $OpenBSD: snmpc.c,v 1.12 2019/10/03 07:23:46 semarie Exp $ */
/*
* Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org>
@@ -496,7 +496,7 @@ snmpc_get(int argc, char *argv[])
err(1, "malloc");
for (i = 0; i < argc; i++) {
if (smi_string2oid(argv[i], &oid[i]) == -1)
- errx(1, "%s: Unknown object identifier", argv[0]);
+ errx(1, "%s: Unknown object identifier", argv[i]);
}
if (strcmp(snmp_app->name, "getnext") == 0) {
if ((pdu = snmp_getnext(agent, oid, argc)) == NULL)