summaryrefslogtreecommitdiffstats
path: root/lib/filters/filter.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-02-13 10:45:26 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2012-02-13 10:45:26 +0000
commit69ad7c1affc1334a43d50513f7776e43ff87551e (patch)
treecfd0de06f2f278e9232551eca0006c4df78d9425 /lib/filters/filter.c
parent75fad6eaa7ea60691a1a1e2a44558f68f161ddc6 (diff)
downloadlvm2-69ad7c1affc1334a43d50513f7776e43ff87551e.tar.gz
lvm2-69ad7c1affc1334a43d50513f7776e43ff87551e.tar.xz
lvm2-69ad7c1affc1334a43d50513f7776e43ff87551e.zip
Remove duplicit test
When it's space it's also not a '\0'.
Diffstat (limited to 'lib/filters/filter.c')
-rw-r--r--lib/filters/filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/filters/filter.c b/lib/filters/filter.c
index 9d08a7a9..45c3e7af 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 */