Skip to contentSkip to conversation

tools/libfsimage: build fix

PATCH Christoph Egger 2 participants 2 messages May 25, 2011 – May 26, 2011

lore
Share & tools
lore
#0 lore raw

Fix warning: array subscript has type 'char'

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
tools/libfsimage/xfs/fsys_xfs.c +3 -2
diff -r 87ff9d4de6f0 tools/libfsimage/xfs/fsys_xfs.c
@@ -571,7 +571,7 @@ xfs_dir (fsi_file_t *ffi, char *dirname)
 			continue;
 		}
 
-		if (!*dirname || isspace (*dirname)) {
+		if (!*dirname || isspace ((uint8_t)*dirname)) {
 			if ((di_mode & IFMT) != IFREG) {
 				errnum = ERR_BAD_FILETYPE;
 				return 0;
@@ -588,7 +588,8 @@ xfs_dir (fsi_file_t *ffi, char *dirname)
 
 		for (; *dirname == '/'; dirname++);
 
-		for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/'; rest++);
+		for (rest = dirname; (ch = *rest)
+                   && !isspace ((uint8_t)ch) && ch != '/'; rest++);
 		*rest = 0;
 
 		name = first_dentry (ffi, &new_ino);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel