summaryrefslogtreecommitdiff
path: root/usr.sbin/lpd/parse.y
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2018-07-09 12:05:12 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2018-07-09 12:05:12 +0000
commit07783b4f5b173dfc558ad9ee983a219d1d1d47e7 (patch)
treed38338384343fb9b90ef5b6bc56754492c0509f9 /usr.sbin/lpd/parse.y
parent05f0f931ad684cb645ad517777a3d999636483c3 (diff)
No need to mention which memory allocation entry point failed (malloc,
calloc or strdup), we just need to log that we ran out of memory in a particular function. Recommended by florian@ and deraadt@ ok benno@ henning@ tb@
Diffstat (limited to 'usr.sbin/lpd/parse.y')
-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 ca5ef6e7270..608818e772f 100644
--- a/usr.sbin/lpd/parse.y
+++ b/usr.sbin/lpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.1 2018/04/27 16:14:37 eric Exp $ */
+/* $OpenBSD: parse.y,v 1.2 2018/07/09 12:05:11 krw Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -549,16 +549,16 @@ pushfile(const char *name, int secret)
struct file *nfile;
if ((nfile = calloc(1, sizeof(struct file))) == NULL) {
- log_warn("warn: malloc");
+ log_warn("%s", __func__);
return (NULL);
}
if ((nfile->name = strdup(name)) == NULL) {
- log_warn("warn: malloc");
+ log_warn("%s", __func__);
free(nfile);
return (NULL);
}
if ((nfile->stream = fopen(nfile->name, "r")) == NULL) {
- log_warn("warn: %s", nfile->name);
+ log_warn("%s: %s", __func__, nfile->name);
free(nfile->name);
free(nfile);
return (NULL);