summaryrefslogtreecommitdiff
path: root/bin/ksh
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-11-07 20:48:29 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-11-07 20:48:29 +0000
commitaae7b7ebe81ba98596f22f2f87fed605c217e067 (patch)
tree84e5a1749a54f5e2f5d8e540f8b5a2f20471e25b /bin/ksh
parent51305be46c497f4ccc479da5c510e7c3ead8d22a (diff)
Make it clearer that warningf()'s first argument determines whether the
lineno is printed. ok nicm@
Diffstat (limited to 'bin/ksh')
-rw-r--r--bin/ksh/io.c6
-rw-r--r--bin/ksh/sh.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/bin/ksh/io.c b/bin/ksh/io.c
index a035ede507a..921fb417e33 100644
--- a/bin/ksh/io.c
+++ b/bin/ksh/io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: io.c,v 1.32 2015/10/19 14:42:16 mmcc Exp $ */
+/* $OpenBSD: io.c,v 1.33 2015/11/07 20:48:28 mmcc Exp $ */
/*
* shell buffered IO and formatted output
@@ -39,11 +39,11 @@ errorf(const char *fmt, ...)
/* like errorf(), but no unwind is done */
void
-warningf(int fileline, const char *fmt, ...)
+warningf(bool show_lineno, const char *fmt, ...)
{
va_list va;
- error_prefix(fileline);
+ error_prefix(show_lineno);
va_start(va, fmt);
shf_vfprintf(shl_out, fmt, va);
va_end(va);
diff --git a/bin/ksh/sh.h b/bin/ksh/sh.h
index f9473c3c732..fd36627b7c0 100644
--- a/bin/ksh/sh.h
+++ b/bin/ksh/sh.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sh.h,v 1.51 2015/11/01 15:38:53 mmcc Exp $ */
+/* $OpenBSD: sh.h,v 1.52 2015/11/07 20:48:28 mmcc Exp $ */
/*
* Public Domain Bourne/Korn shell
@@ -478,7 +478,7 @@ char **hist_get_newest(int);
/* io.c */
void errorf(const char *, ...)
__attribute__((__noreturn__, __format__ (printf, 1, 2)));
-void warningf(int, const char *, ...)
+void warningf(bool, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
void bi_errorf(const char *, ...)
__attribute__((__format__ (printf, 1, 2)));