From 69ad7c1affc1334a43d50513f7776e43ff87551e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 13 Feb 2012 10:45:26 +0000 Subject: [PATCH] Remove duplicit test When it's space it's also not a '\0'. --- lib/filters/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/filters/filter.c b/lib/filters/filter.c index 9d08a7a9e..45c3e7af9 100644 --- a/lib/filters/filter.c +++ b/lib/filters/filter.c @@ -221,7 +221,7 @@ static int _scan_proc_dev(const char *proc, const struct dm_config_node *cn) while (fgets(line, 80, pd) != NULL) { i = 0; - while (line[i] == ' ' && line[i] != '\0') + while (line[i] == ' ') i++; /* If it's not a number it may be name of section */ @@ -238,7 +238,7 @@ static int _scan_proc_dev(const char *proc, const struct dm_config_node *cn) /* Find the start of the device major name */ while (line[i] != ' ' && line[i] != '\0') i++; - while (line[i] == ' ' && line[i] != '\0') + while (line[i] == ' ') i++; /* Look for md device */ -- 2.43.5