diff --git a/src/lib-stream.c b/src/lib-stream.c index 884015c..2b1e803 100644 --- a/src/lib-stream.c +++ b/src/lib-stream.c @@ -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);