mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Change all strcmp() to g_strcmp0() to handle nulls gracefully
Just a string replacement (but i did check every one of them)
sed -i 's/strcmp(/g_strcmp0(/g' **/*.c
This commit is contained in:
parent
9ffe52ec5e
commit
f14199d9c1
57 changed files with 170 additions and 170 deletions
|
|
@ -127,7 +127,7 @@ static void cmd_window_info(WINDOW_REC *win)
|
|||
win->active_server->tag : "NONE");
|
||||
} else {
|
||||
if (win->active_server != NULL &&
|
||||
strcmp(win->active_server->tag, win->servertag) != 0)
|
||||
g_strcmp0(win->active_server->tag, win->servertag) != 0)
|
||||
g_warning("Active server isn't the sticky server!");
|
||||
|
||||
printformat_window(win, MSGLEVEL_CLIENTCRAP,
|
||||
|
|
@ -609,7 +609,7 @@ static void cmd_window_name(const char *data)
|
|||
if (win == NULL || win == active_win)
|
||||
window_set_name(active_win, data);
|
||||
else if (active_win->name == NULL ||
|
||||
strcmp(active_win->name, data) != 0) {
|
||||
g_strcmp0(active_win->name, data) != 0) {
|
||||
printformat_window(active_win, MSGLEVEL_CLIENTERROR,
|
||||
TXT_WINDOW_NAME_NOT_UNIQUE, data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue