tools/libfsimage: build fix (ctype macros applied to char)
authorChristoph Egger <Christoph.Egger@amd.com>
Thu, 26 May 2011 14:43:22 +0000 (15:43 +0100)
committerChristoph Egger <Christoph.Egger@amd.com>
Thu, 26 May 2011 14:43:22 +0000 (15:43 +0100)
Fix warning: array subscript has type 'char'

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libfsimage/xfs/fsys_xfs.c

index 6366d16d0dfdf6ba39b28fa29c55d66bf98a8ee6..0261a5284a09cad838d9765acf2b0694acf2f76f 100644 (file)
@@ -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);