Simplified condition in while

if `*ptr` value equals ' ', then condition `if(*ptr != '\0')` will always true
This commit is contained in:
Roman Kalashnikov 2017-10-28 20:56:04 +03:00 committed by GitHub
parent a75014c705
commit cdc61bc206
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -616,7 +616,7 @@ static bool make_proc_acpi_key_val(char **_ptr, char **_key, char **_val)
*(ptr++) = '\0'; /* terminate the key. */
while ((*ptr == ' ') && (*ptr != '\0'))
while (*ptr == ' ')
ptr++; /* skip whitespace. */
if (*ptr == '\0')