common: Use "!ptr" for comparison to NULL

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
This commit is contained in:
Elyes HAOUAS 2021-04-13 10:29:24 +02:00
parent 8106f01c17
commit c66fb38bf8
3 changed files with 4 additions and 4 deletions

View file

@ -319,7 +319,7 @@ bool expand_path(char **path) {
memmove(ptr + 1, ptr, strlen(ptr) + 1);
*ptr = '\\';
}
if (wordexp(*path, &p, 0) != 0 || p.we_wordv[0] == NULL) {
if (wordexp(*path, &p, 0) != 0 || !p.we_wordv[0]) {
wordfree(&p);
return false;
}