summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2003-10-18 20:35:36 +0000
committerotto <otto@openbsd.org>2003-10-18 20:35:36 +0000
commitb53b17a11e3cba1561c6fbcc497f6db1f1eefb3f (patch)
treeee96869ab3b98639796f3ca33160c9c477a379ef
parenterr(1, "out of mem") -> err(1, NULL) (diff)
downloadwireguard-openbsd-b53b17a11e3cba1561c6fbcc497f6db1f1eefb3f.tar.xz
wireguard-openbsd-b53b17a11e3cba1561c6fbcc497f6db1f1eefb3f.zip
err(1, "cannot allocate mem") -> err(1, NULL)
-rw-r--r--usr.bin/bc/bc.y10
-rw-r--r--usr.bin/bc/scan.l8
2 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/bc/bc.y b/usr.bin/bc/bc.y
index df52e14aaee..c97fbeb803a 100644
--- a/usr.bin/bc/bc.y
+++ b/usr.bin/bc/bc.y
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: bc.y,v 1.11 2003/10/18 19:57:10 otto Exp $ */
+/* $OpenBSD: bc.y,v 1.12 2003/10/18 20:35:36 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: bc.y,v 1.11 2003/10/18 19:57:10 otto Exp $";
+static const char rcsid[] = "$OpenBSD: bc.y,v 1.12 2003/10/18 20:35:36 otto Exp $";
#endif /* not lint */
#include <ctype.h>
@@ -628,7 +628,7 @@ grow(void)
p = realloc(instructions, newsize * sizeof(*p));
if (p == NULL) {
free(instructions);
- err(1, "cannot realloc instruction buffer");
+ err(1, NULL);
}
instructions = p;
instr_sz = newsize;
@@ -651,7 +651,7 @@ as(const char *str)
instructions[current].index = ALLOC_STRING;
instructions[current].u.astr = strdup(str);
if (instructions[current].u.astr == NULL)
- err(1, "cannot allocate string");
+ err(1, NULL);
return current++;
}
@@ -767,7 +767,7 @@ yyerror(char *s)
asprintf(&str, "%s: %s:%d: %s: %s unexpected",
__progname, filename, lineno, s, yytext);
if (str == NULL)
- err(1, "cannot allocate string");
+ err(1, NULL);
fputs("c[", stdout);
for (p = str; *p != '\0'; p++) {
diff --git a/usr.bin/bc/scan.l b/usr.bin/bc/scan.l
index 598ab015426..541b814e97c 100644
--- a/usr.bin/bc/scan.l
+++ b/usr.bin/bc/scan.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: scan.l,v 1.8 2003/10/18 19:57:10 otto Exp $ */
+/* $OpenBSD: scan.l,v 1.9 2003/10/18 20:35:36 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -18,7 +18,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: scan.l,v 1.8 2003/10/18 19:57:10 otto Exp $";
+static const char rcsid[] = "$OpenBSD: scan.l,v 1.9 2003/10/18 20:35:36 otto Exp $";
#endif /* not lint */
#include <err.h>
@@ -172,7 +172,7 @@ init_strbuf(void)
if (strbuf == NULL) {
strbuf = malloc(strbuf_sz);
if (strbuf == NULL)
- err(1, "cannot allocate string buffer");
+ err(1, NULL);
}
strbuf[0] = '\0';
}
@@ -192,7 +192,7 @@ add_str(const char *str)
p = realloc(strbuf, newsize);
if (p == NULL) {
free(strbuf);
- err(1, "cannot realloc string buffer");
+ err(1, NULL);
}
strbuf_sz = newsize;
strbuf = p;