fgetc(3) returns int.

Note: "char" is actually "unsigned char" on some platforms including
NetBSD/arm.  Comparing char value with EOF(-1) always fails on the
platforms.
This commit is contained in:
Tomoyuki Sahara
2012-12-14 09:35:43 +09:00
parent c81a97df94
commit 4bfe1f4bf5
+2 -2
View File
@@ -145,7 +145,7 @@ for_each_gem (char before[1024], char after[1024],
{
/* active GEM check */
FILE *active_gem_file;
char gem_char;
int gem_char;
char gem_name[1024] = { 0 };
int char_index;
char gem_list[1024][1024] = { { 0 }, { 0 } };
@@ -166,7 +166,7 @@ for_each_gem (char before[1024], char after[1024],
char_index = 0;
gem_index = 0;
skip = FALSE;
while((gem_char = fgetc(active_gem_file)) != EOF) {
while ((gem_char = fgetc(active_gem_file)) != EOF) {
if (gem_char == '\n') {
/* Every line contains one active GEM */
gem_name[char_index++] = '\0';