diff options
author | 2015-11-07 20:48:28 +0000 | |
---|---|---|
committer | 2015-11-07 20:48:28 +0000 | |
commit | 504796f74df89691ef180290a7a548ba760b33cf (patch) | |
tree | ef3ba995572bbf4487bb657b6a9f8247d0b2cb13 | |
parent | Spell `unused' correctly. (diff) | |
download | wireguard-openbsd-504796f74df89691ef180290a7a548ba760b33cf.tar.xz wireguard-openbsd-504796f74df89691ef180290a7a548ba760b33cf.zip |
Make it clearer that warningf()'s first argument determines whether the
lineno is printed.
ok nicm@
-rw-r--r-- | bin/ksh/io.c | 6 | ||||
-rw-r--r-- | bin/ksh/sh.h | 4 |
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))); |