summaryrefslogtreecommitdiff
path: root/usr.bin/m4
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/m4')
-rw-r--r--usr.bin/m4/gnum4.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.bin/m4/gnum4.c b/usr.bin/m4/gnum4.c
index 4837cf8b14b..99d5255c1a6 100644
--- a/usr.bin/m4/gnum4.c
+++ b/usr.bin/m4/gnum4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gnum4.c,v 1.47 2015/01/16 06:40:09 deraadt Exp $ */
+/* $OpenBSD: gnum4.c,v 1.48 2015/03/14 23:00:43 millert Exp $ */
/*
* Copyright (c) 1999 Marc Espie
@@ -74,9 +74,7 @@ new_path_entry(const char *dirname)
n = malloc(sizeof(struct path_entry));
if (!n)
errx(1, "out of memory");
- n->name = strdup(dirname);
- if (!n->name)
- errx(1, "out of memory");
+ n->name = xstrdup(dirname);
n->next = 0;
return n;
}
@@ -111,9 +109,7 @@ ensure_m4path()
if (!envpath)
return;
/* for portability: getenv result is read-only */
- envpath = strdup(envpath);
- if (!envpath)
- errx(1, "out of memory");
+ envpath = xstrdup(envpath);
for (sweep = envpath;
(path = strsep(&sweep, ":")) != NULL;)
addtoincludepath(path);