]> sourceware.org Git - lvm2.git/commitdiff
Remove duplicit test
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 13 Feb 2012 10:45:26 +0000 (10:45 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 13 Feb 2012 10:45:26 +0000 (10:45 +0000)
When it's space it's also not a '\0'.

lib/filters/filter.c

index 9d08a7a9eb2f94a43b804328eba0672d1b3e4bc3..45c3e7af9ce06b6058fbd3811a2f7c5139505d91 100644 (file)
@@ -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 */
This page took 0.03935 seconds and 5 git commands to generate.