Skip to contentSkip to conversation

LVM2/lib/filters filter.c

PATCH [email protected] 1 participant 1 message Feb 13, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-02-13 10:45:26

Modified files:
lib/filters : filter.c

Log message:
Remove duplicit test

When it's space it's also not a '\0'.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter.c.diff?cvsroot=lvm2&r1=1.68&r2=1.69

lib/filters/filter.c +2 -2
@@ -221,7 +221,7 @@
 
 	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 @@
 		/* 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 */