* Print "EOF" instead of -1 when it means EOF.
This commit is contained in:
+4
-4
@@ -300,8 +300,8 @@ size_t NEW(fread)(void *ptr, size_t size, size_t nmemb, FILE *stream)
|
||||
ret = ORIG(fn)(stream); \
|
||||
_zz_unlock(fd); \
|
||||
FGETC_FUZZ \
|
||||
if(ret < 0) \
|
||||
debug("%s([%i]) = %i", __func__, fd, ret); \
|
||||
if(ret == EOF) \
|
||||
debug("%s([%i]) = EOF", __func__, fd); \
|
||||
else \
|
||||
debug("%s([%i]) = '%c'", __func__, fd, ret); \
|
||||
} while(0)
|
||||
@@ -404,8 +404,8 @@ int NEW(ungetc)(int c, FILE *stream)
|
||||
#endif
|
||||
}
|
||||
|
||||
if(ret < 0)
|
||||
debug("%s(0x%02x, [%i]) = %i", __func__, c, fd, ret);
|
||||
if(ret == EOF)
|
||||
debug("%s(0x%02x, [%i]) = EOF", __func__, c, fd);
|
||||
else
|
||||
debug("%s(0x%02x, [%i]) = '%c'", __func__, c, fd, ret);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user