1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Reduce scope of num in ui_print_system_msg_from_recipient()

This commit is contained in:
Michael Vetter 2019-07-22 13:25:52 +02:00
parent 4a0fa1cf9e
commit d004891a29

View File

@ -742,14 +742,12 @@ ui_print_system_msg_from_recipient(const char *const barejid, const char *messag
ProfChatWin *chatwin = wins_get_chat(barejid);
ProfWin *window = (ProfWin*)chatwin;
if (window == NULL) {
int num = 0;
window = wins_new_chat(barejid);
if (window) {
chatwin = (ProfChatWin*)window;
num = wins_get_num(window);
int num = wins_get_num(window);
status_bar_active(num, WIN_CHAT, chatwin->barejid);
} else {
num = 0;
window = wins_get_console();
status_bar_active(1, WIN_CONSOLE, "console");
}