summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dvmrpd
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2018-07-09 12:05:10 +0000
committerkrw <krw@openbsd.org>2018-07-09 12:05:10 +0000
commit6a3d55f939083b5d9457342b25519eade91f9c38 (patch)
tree188f28c742c46075222046ad71a98373cd17f78e /usr.sbin/dvmrpd
parentExtend the v4_defroute() function description and make the fallback to (diff)
downloadwireguard-openbsd-6a3d55f939083b5d9457342b25519eade91f9c38.tar.xz
wireguard-openbsd-6a3d55f939083b5d9457342b25519eade91f9c38.zip
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/dvmrpd')
-rw-r--r--usr.sbin/dvmrpd/parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/dvmrpd/parse.y b/usr.sbin/dvmrpd/parse.y
index d0fd56e4a14..4ce5fc147d2 100644
--- a/usr.sbin/dvmrpd/parse.y
+++ b/usr.sbin/dvmrpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.34 2018/07/08 17:15:07 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.35 2018/07/09 12:05:11 krw Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -688,16 +688,16 @@ pushfile(const char *name, int secret)
struct file *nfile;
if ((nfile = calloc(1, sizeof(struct file))) == NULL) {
- log_warn("calloc");
+ log_warn("%s", __func__);
return (NULL);
}
if ((nfile->name = strdup(name)) == NULL) {
- log_warn("strdup");
+ log_warn("%s", __func__);
free(nfile);
return (NULL);
}
if ((nfile->stream = fopen(nfile->name, "r")) == NULL) {
- log_warn("%s", nfile->name);
+ log_warn("%s: %s", __func__, nfile->name);
free(nfile->name);
free(nfile);
return (NULL);