summaryrefslogtreecommitdiff
path: root/bin/ksh/edit.c
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2018-01-16 22:52:33 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2018-01-16 22:52:33 +0000
commit912194b99b5052b815d28bd8ce3752c1212af241 (patch)
treec9008f1acdeb7347f50f1720a55e5ef04012d98e /bin/ksh/edit.c
parent4a4314b548e46aa0214ec94a4f342d830019a314 (diff)
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@
Diffstat (limited to 'bin/ksh/edit.c')
-rw-r--r--bin/ksh/edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c
index d7f2c03bc83..9cfaa197d6a 100644
--- a/bin/ksh/edit.c
+++ b/bin/ksh/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.62 2018/01/15 14:58:05 jca Exp $ */
+/* $OpenBSD: edit.c,v 1.63 2018/01/16 22:52:32 jca Exp $ */
/*
* Command line editing - common code
@@ -372,7 +372,7 @@ x_file_glob(int flags, const char *str, int slen, char ***wordsp)
source = s;
if (yylex(ONEWORD|UNESCAPE) != LWORD) {
source = sold;
- internal_errorf(0, "fileglob: substitute error");
+ internal_warningf("fileglob: substitute error");
return 0;
}
source = sold;
@@ -616,12 +616,12 @@ x_try_array(const char *buf, int buflen, const char *want, int wantlen,
/* Try to find the array. */
if (asprintf(&name, "complete_%.*s_%d", cmdlen, cmd, n) < 0)
- internal_errorf(1, "unable to allocate memory");
+ internal_errorf("unable to allocate memory");
v = global(name);
free(name);
if (~v->flag & (ISSET|ARRAY)) {
if (asprintf(&name, "complete_%.*s", cmdlen, cmd) < 0)
- internal_errorf(1, "unable to allocate memory");
+ internal_errorf("unable to allocate memory");
v = global(name);
free(name);
if (~v->flag & (ISSET|ARRAY))