Browse Source

Be consistent in warn() and log_warn() usage when

running out of memory.
Next step, be correct *and* consistent.
ok dennis@ tb@ benno@ schwarze@
OPENBSD_6_4
krw 6 years ago
parent
commit
81de90466c
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/usr.sbin/ntpd/parse.y

+ 3
- 3
src/usr.sbin/ntpd/parse.y View File

@ -1,4 +1,4 @@
/* $OpenBSD: parse.y,v 1.67 2017/08/11 19:12:21 naddy Exp $ */
/* $OpenBSD: parse.y,v 1.68 2018/07/08 17:15:07 krw Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -733,11 +733,11 @@ pushfile(const char *name)
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);
}


Loading…
Cancel
Save