aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/top/display.c
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2018-05-22 02:13:04 +0000
committerEitan Adler <eadler@FreeBSD.org>2018-05-22 02:13:04 +0000
commitbc875b45c5e745c312ade01820f2055c8eaba8ff (patch)
tree03163e87ef9387b7845793bd2b41a89ebc59a0e5 /usr.bin/top/display.c
parent9e2154ff1c388193a9b21b770edd0cedf91f897a (diff)
downloadsrc-bc875b45c5e745c312ade01820f2055c8eaba8ff.tar.gz
src-bc875b45c5e745c312ade01820f2055c8eaba8ff.zip
top(1): unbreak build with gcc7; fix varargs
- use correct function for varargs argument - allow build to complete with gcc7 at current WARNS Reported by: jhibbits, ian
Notes
Notes: svn path=/head/; revision=334010
Diffstat (limited to 'usr.bin/top/display.c')
-rw-r--r--usr.bin/top/display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/top/display.c b/usr.bin/top/display.c
index f37384923090..b8f84711c174 100644
--- a/usr.bin/top/display.c
+++ b/usr.bin/top/display.c
@@ -1011,7 +1011,7 @@ new_message(int type, char *msgfmt, ...)
va_start(args, msgfmt);
/* first, format the message */
- snprintf(next_msg, sizeof(next_msg), msgfmt, args);
+ vsnprintf(next_msg, sizeof(next_msg), msgfmt, args);
va_end(args);