summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpd
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2018-07-11 07:39:22 +0000
committerkrw <krw@openbsd.org>2018-07-11 07:39:22 +0000
commita062aa9d6a1c6c36ba1886ff476a56da7d9bd5de (patch)
tree6674982dffd0594a3958b414dbfdadd959c78a5a /usr.sbin/lpd
parentTurn yesterday's optimistic ! in an XXX comment into a more cautious ? (diff)
downloadwireguard-openbsd-a062aa9d6a1c6c36ba1886ff476a56da7d9bd5de.tar.xz
wireguard-openbsd-a062aa9d6a1c6c36ba1886ff476a56da7d9bd5de.zip
Do for most running out of memory err() what was done for most running
out of memory log_warn(). i.e. ("%s", __func__) instead of manual function names and redundant verbiage about which wrapper detected the out of memory condition. ok henning@
Diffstat (limited to 'usr.sbin/lpd')
-rw-r--r--usr.sbin/lpd/parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/lpd/parse.y b/usr.sbin/lpd/parse.y
index 608818e772f..eae721cf2ab 100644
--- a/usr.sbin/lpd/parse.y
+++ b/usr.sbin/lpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.2 2018/07/09 12:05:11 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.3 2018/07/11 07:39:22 krw Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -446,7 +446,7 @@ top:
}
yylval.v.string = strdup(buf);
if (yylval.v.string == NULL)
- err(1, "yylex: strdup");
+ err(1, "%s", __func__);
return (STRING);
}
@@ -511,7 +511,7 @@ nodigits:
*p = '\0';
if ((token = lookup(buf)) == STRING)
if ((yylval.v.string = strdup(buf)) == NULL)
- err(1, "yylex: strdup");
+ err(1, "%s", __func__);
return (token);
}
if (c == '\n') {
@@ -689,7 +689,7 @@ cmdline_symset(char *s)
len = strlen(s) - strlen(val) + 1;
if ((sym = malloc(len)) == NULL)
- errx(1, "cmdline_symset: malloc");
+ errx(1, "%s", __func__);
(void)strlcpy(sym, s, len);