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