commit 89c0e7493f47ee0c4b4b759ac8bd5de2d9c80b5f
parent 14b9a42f5bea9a4e6e38f84d83cae8883d794d3e
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 14 Jul 2018 21:15:23 +0200
tweaks: don't call va_start() without calling va_end() [coverity scan]
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -2157,6 +2157,11 @@ void statusline(message_type importance, const char *msg, ...)
UNSET(WHITESPACE_DISPLAY);
#endif
+ /* Ignore a message with an importance that is lower than the last one. */
+ if ((lastmessage == ALERT && importance != ALERT) ||
+ (lastmessage == MILD && importance == HUSH))
+ return;
+
va_start(ap, msg);
/* Curses mode is turned off. If we use wmove() now, it will muck
@@ -2168,11 +2173,6 @@ void statusline(message_type importance, const char *msg, ...)
return;
}
- /* If there already was an alert message, ignore lesser ones. */
- if ((lastmessage == ALERT && importance != ALERT) ||
- (lastmessage == MILD && importance == HUSH))
- return;
-
/* If the ALERT status has been reset, reset the counter. */
if (lastmessage == HUSH)
alerts = 0;