summaryrefslogtreecommitdiff
path: root/usr.sbin/ypldap/parse.y
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2018-07-08 17:15:08 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2018-07-08 17:15:08 +0000
commitd464459430dfe32556dda698f3f70370957dd913 (patch)
tree033b62bab4275329edca02f08ec39149953e3763 /usr.sbin/ypldap/parse.y
parentfc6ca168ed4b376c9c7f2c398d10ff6c1497be54 (diff)
Be consistent in warn() and log_warn() usage when
running out of memory. Next step, be correct *and* consistent. ok dennis@ tb@ benno@ schwarze@
Diffstat (limited to 'usr.sbin/ypldap/parse.y')
-rw-r--r--usr.sbin/ypldap/parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ypldap/parse.y b/usr.sbin/ypldap/parse.y
index 5fdcc850f79..63735147890 100644
--- a/usr.sbin/ypldap/parse.y
+++ b/usr.sbin/ypldap/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.25 2018/06/11 09:36:49 denis Exp $ */
+/* $OpenBSD: parse.y,v 1.26 2018/07/08 17:15:07 krw Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -781,11 +781,11 @@ pushfile(const char *name, int secret)
struct file *nfile;
if ((nfile = calloc(1, sizeof(struct file))) == NULL) {
- log_warn("malloc");
+ log_warn("calloc");
return (NULL);
}
if ((nfile->name = strdup(name)) == NULL) {
- log_warn("malloc");
+ log_warn("strdup");
free(nfile);
return (NULL);
}
@@ -845,7 +845,7 @@ parse_config(struct env *x_conf, const char *filename, int opts)
conf->sc_conf_tv.tv_usec = 0;
conf->sc_cafile = strdup(YPLDAP_CERT_FILE);
if (conf->sc_cafile == NULL) {
- log_warn("malloc");
+ log_warn("strdup");
return (-1);
}