1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: remove unnecessary null check

This commit is contained in:
Sébastien Helleu
2025-02-11 21:38:24 +01:00
parent 8198aade2e
commit 6388d36858
+4 -4
View File
@@ -2966,8 +2966,8 @@ string_split_command (const char *command, char separator)
str_idx = -1;
p = buffer;
/* strip white spaces at the beginning of the line */
while (*p == ' ') p++;
if (p && p[0])
while (p[0] == ' ') p++;
if (p[0])
array[arr_idx++] = strdup (p);
}
else if (type == 2)
@@ -2980,8 +2980,8 @@ string_split_command (const char *command, char separator)
buffer[str_idx] = '\0';
p = buffer;
while (*p == ' ') p++;
if (p && p[0])
while (p[0] == ' ') p++;
if (p[0])
array[arr_idx++] = strdup (p);
array[arr_idx] = NULL;