mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
Merge pull request #235 from dequis/g_strcmp0
Change all strcmp() to g_strcmp0() to handle nulls gracefully
This commit is contained in:
commit
03be2861dc
58 changed files with 174 additions and 170 deletions
|
|
@ -189,7 +189,7 @@ static void cmd_server_add(const char *data)
|
|||
if (g_hash_table_lookup(optlist, "proxy")) rec->no_proxy = FALSE;
|
||||
if (g_hash_table_lookup(optlist, "noproxy")) rec->no_proxy = TRUE;
|
||||
|
||||
if (*password != '\0' && strcmp(password, "-") != 0) rec->password = g_strdup(password);
|
||||
if (*password != '\0' && g_strcmp0(password, "-") != 0) rec->password = g_strdup(password);
|
||||
value = g_hash_table_lookup(optlist, "host");
|
||||
if (value != NULL && *value != '\0') {
|
||||
rec->own_host = g_strdup(value);
|
||||
|
|
@ -268,7 +268,7 @@ static void cmd_server_connect(const char *data)
|
|||
"connect", &optlist, &addr))
|
||||
return;
|
||||
|
||||
if (*addr == '\0' || strcmp(addr, "+") == 0)
|
||||
if (*addr == '\0' || g_strcmp0(addr, "+") == 0)
|
||||
cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
if (*addr == '+') window_create(NULL, FALSE);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue