mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +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
|
|
@ -646,11 +646,11 @@ static int term_setup(TERM_REC *term)
|
|||
str = g_string_new(NULL);
|
||||
if (term->TI_sgr0)
|
||||
g_string_append(str, term->TI_sgr0);
|
||||
if (term->TI_rmul && (term->TI_sgr0 == NULL || strcmp(term->TI_rmul, term->TI_sgr0) != 0))
|
||||
if (term->TI_rmul && (term->TI_sgr0 == NULL || g_strcmp0(term->TI_rmul, term->TI_sgr0) != 0))
|
||||
g_string_append(str, term->TI_rmul);
|
||||
if (term->TI_rmso && (term->TI_sgr0 == NULL || strcmp(term->TI_rmso, term->TI_sgr0) != 0))
|
||||
if (term->TI_rmso && (term->TI_sgr0 == NULL || g_strcmp0(term->TI_rmso, term->TI_sgr0) != 0))
|
||||
g_string_append(str, term->TI_rmso);
|
||||
if (term->TI_ritm && (term->TI_sgr0 == NULL || strcmp(term->TI_ritm, term->TI_sgr0) != 0))
|
||||
if (term->TI_ritm && (term->TI_sgr0 == NULL || g_strcmp0(term->TI_ritm, term->TI_sgr0) != 0))
|
||||
g_string_append(str, term->TI_ritm);
|
||||
term->TI_normal = str->str;
|
||||
g_string_free(str, FALSE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue