tweaks: don't call va_start() without calling va_end() [coverity scan]
parent
14b9a42f5b
commit
89c0e7493f
10
src/winio.c
10
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;
|
||||
|
|
Loading…
Reference in New Issue