blob: 8676d05bfcc8c8db69477307e7b37a2fff6a521c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
$NetBSD: patch-dd,v 1.1 2008/03/03 16:45:27 hannken Exp $
--- libfsimage/fat/fsys_fat.c.orig 2008-01-31 10:06:54.000000000 +0000
+++ libfsimage/fat/fsys_fat.c 2008-03-01 11:52:29.000000000 +0000
@@ -301,7 +301,7 @@ fat_dir (fsi_file_t *ffi, char *dirname)
/* if we have a real file (and we're not just printing possibilities),
then this is where we want to exit */
- if (!*dirname || isspace (*dirname))
+ if (!*dirname || isspace ((uint8_t)*dirname))
{
if (attrib & FAT_ATTRIB_DIR)
{
@@ -325,7 +325,7 @@ fat_dir (fsi_file_t *ffi, char *dirname)
/* Directories don't have a file size */
filemax = INT_MAX;
- for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/'; rest++);
+ for (rest = dirname; (ch = *rest) && !isspace ((uint8_t)ch) && ch != '/'; rest++);
*rest = 0;
@@ -426,12 +426,12 @@ fat_dir (fsi_file_t *ffi, char *dirname)
{
int i, j, c;
- for (i = 0; i < 8 && (c = filename[i] = tolower (dir_buf[i]))
+ for (i = 0; i < 8 && (c = filename[i] = tolower ((uint8_t)dir_buf[i]))
&& !isspace (c); i++);
filename[i++] = '.';
- for (j = 0; j < 3 && (c = filename[i + j] = tolower (dir_buf[8 + j]))
+ for (j = 0; j < 3 && (c = filename[i + j] = tolower ((uint8_t)dir_buf[8 + j]))
&& !isspace (c); j++);
if (j == 0)
|