summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMartijn van Duren <martijn@cvs.openbsd.org>2019-08-11 18:11:11 +0000
committerMartijn van Duren <martijn@cvs.openbsd.org>2019-08-11 18:11:11 +0000
commit85984500d04a3504bbf3167e776d04fa51d91ed9 (patch)
tree0dcd60b0e4eb514440f97d4313f4b0da92042b23 /usr.bin
parent94cc0653684ea3037342ad58a4447fb7a1b6b66d (diff)
Replace some err(1, NULL) with err(1, "malloc").
Requested by deraadt@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/snmp/snmpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/snmp/snmpc.c b/usr.bin/snmp/snmpc.c
index ad8e5d6e157..b0df7f7bdc2 100644
--- a/usr.bin/snmp/snmpc.c
+++ b/usr.bin/snmp/snmpc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snmpc.c,v 1.4 2019/08/11 17:22:31 martijn Exp $ */
+/* $OpenBSD: snmpc.c,v 1.5 2019/08/11 18:11:10 martijn Exp $ */
/*
* Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org>
@@ -554,7 +554,7 @@ snmpc_trap(int argc, char *argv[])
if (byte >= strl) {
if ((str = recallocarray(str, strl,
byte + 1, 1)) == NULL)
- err(1, NULL);
+ err(1, "malloc");
strl = byte + 1;
}
str[byte] |= 0x80 >> (lval % 8);
@@ -579,7 +579,7 @@ snmpc_trap(int argc, char *argv[])
case 'd':
/* String always shrinks */
if ((str = malloc(strlen(argv[i + 2]))) == NULL)
- err(1, NULL);
+ err(1, "malloc");
tmpstr = argv[i + 2];
strl = 0;
do {
@@ -648,7 +648,7 @@ pastestring:
case 'x':
/* String always shrinks */
if ((str = malloc(strlen(argv[i + 2]))) == NULL)
- err(1, NULL);
+ err(1, "malloc");
tmpstr = argv[i + 2];
strl = 0;
do {