From a062aa9d6a1c6c36ba1886ff476a56da7d9bd5de Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 11 Jul 2018 07:39:22 +0000 Subject: Do for most running out of memory err() what was done for most running out of memory log_warn(). i.e. ("%s", __func__) instead of manual function names and redundant verbiage about which wrapper detected the out of memory condition. ok henning@ --- usr.sbin/httpd/parse.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.sbin/httpd') diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y index 412b786c254..962af87ffc2 100644 --- a/usr.sbin/httpd/parse.y +++ b/usr.sbin/httpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.104 2018/07/09 12:05:11 krw Exp $ */ +/* $OpenBSD: parse.y,v 1.105 2018/07/11 07:39:22 krw Exp $ */ /* * Copyright (c) 2007 - 2015 Reyk Floeter @@ -1401,7 +1401,7 @@ lungetc(int c) if (file->ungetpos >= file->ungetsize) { void *p = reallocarray(file->ungetbuf, file->ungetsize, 2); if (p == NULL) - err(1, "lungetc"); + err(1, "%s", __func__); file->ungetbuf = p; file->ungetsize *= 2; } @@ -1510,7 +1510,7 @@ top: } yylval.v.string = strdup(buf); if (yylval.v.string == NULL) - err(1, "yylex: strdup"); + err(1, "%s", __func__); return (STRING); } @@ -1568,7 +1568,7 @@ nodigits: *p = '\0'; if ((token = lookup(buf)) == STRING) if ((yylval.v.string = strdup(buf)) == NULL) - err(1, "yylex: strdup"); + err(1, "%s", __func__); return (token); } if (c == '\n') { -- cgit v1.2.3-59-g8ed1b