Skip to content

Commit e288438

Browse files
authored
Remove unnecessary check of p in phpdbg_trim (#10122)
The check checks whether p is non-NULL. But if it were NULL the function would crash in later code, so the check is useless. It seems like *p was intended, but that is redundant as well because isspace would return false on '\0'.
1 parent 6d9d2eb commit e288438

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sapi/phpdbg/phpdbg_utils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ PHPDBG_API char *phpdbg_trim(const char *str, size_t len, size_t *new_len) /* {{
199199
const char *p = str;
200200
char *new = NULL;
201201

202-
while (p && isspace(*p)) {
202+
while (isspace(*p)) {
203203
++p;
204204
--len;
205205
}

0 commit comments

Comments
 (0)