From cdc61bc206731c05ab1c7410f5b01d5ffb9442d1 Mon Sep 17 00:00:00 2001 From: Roman Kalashnikov Date: Sat, 28 Oct 2017 20:56:04 +0300 Subject: [PATCH] Simplified condition in `while` if `*ptr` value equals ' ', then condition `if(*ptr != '\0')` will always true --- frontend/drivers/platform_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c index 23418e147d..80bd183322 100644 --- a/frontend/drivers/platform_unix.c +++ b/frontend/drivers/platform_unix.c @@ -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')