summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2018-07-11 07:39:23 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2018-07-11 07:39:23 +0000
commite9159a03ef2d9f0f3a9873c392d95a908b841569 (patch)
tree39796b33181ab19f497e5cc9fff9c0d4957ce007 /usr.sbin/ldpd
parent1be8c8620ab902fc53c6582bca1e1127ad67409a (diff)
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/ldpd')
-rw-r--r--usr.sbin/ldpd/parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ldpd/parse.y b/usr.sbin/ldpd/parse.y
index ff2aa801e6d..cc70041d4d9 100644
--- a/usr.sbin/ldpd/parse.y
+++ b/usr.sbin/ldpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.64 2018/07/09 12:05:11 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.65 2018/07/11 07:39:22 krw Exp $ */
/*
* Copyright (c) 2013, 2015, 2016 Renato Westphal <renato@openbsd.org>
@@ -955,7 +955,7 @@ lungetc(int c)
if (file->ungetpos >= file->ungetsize) {
void *p = reallocarray(file->ungetbuf, file->ungetsize, 2);
if (p == NULL)
- err(1, "lungetc");
+ err(1, "%s", __func__);
file->ungetbuf = p;
file->ungetsize *= 2;
}
@@ -1064,7 +1064,7 @@ yylex(void)
}
yylval.v.string = strdup(buf);
if (yylval.v.string == NULL)
- err(1, "yylex: strdup");
+ err(1, "%s", __func__);
return (STRING);
}
@@ -1122,7 +1122,7 @@ yylex(void)
*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') {