From 912194b99b5052b815d28bd8ce3752c1212af241 Mon Sep 17 00:00:00 2001 From: Jeremie Courreges-Anglas Date: Tue, 16 Jan 2018 22:52:33 +0000 Subject: Introduce internal_warningf() and mark internal_errorf() as noreturn This helps tools like scan-build, and follows the example of warningf() and errorf(). ok anton@ --- bin/ksh/eval.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin/ksh/eval.c') diff --git a/bin/ksh/eval.c b/bin/ksh/eval.c index 7bc9b8bd721..a8dc698bd44 100644 --- a/bin/ksh/eval.c +++ b/bin/ksh/eval.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.58 2018/01/14 16:04:21 anton Exp $ */ +/* $OpenBSD: eval.c,v 1.59 2018/01/16 22:52:32 jca Exp $ */ /* * Expansion - quoting, separation, substitution, globbing @@ -69,7 +69,7 @@ substitute(const char *cp, int f) s->start = s->str = cp; source = s; if (yylex(ONEWORD) != LWORD) - internal_errorf(1, "substitute"); + internal_errorf("substitute"); source = sold; afree(s, ATEMP); return evalstr(yylval.cp, f); @@ -168,7 +168,7 @@ expand(char *cp, /* input word */ size_t len; if (cp == NULL) - internal_errorf(1, "expand(NULL)"); + internal_errorf("expand(NULL)"); /* for alias, readonly, set, typeset commands */ if ((f & DOVACHECK) && is_wdvarassign(cp)) { f &= ~(DOVACHECK|DOBLANK|DOGLOB|DOTILDE); @@ -587,7 +587,7 @@ expand(char *cp, /* input word */ char *p; if ((p = strdup("")) == NULL) - internal_errorf(1, "unable " + internal_errorf("unable " "to allocate memory"); XPput(*wp, p); } -- cgit v1.2.3