Enrico Scholz
2012-08-26 11:37:41 UTC
fputc() returns 'c' in normal case which triggered the error branch
nearly everytime. Detected by the stdio/tst-fseek test.
Signed-off-by: Enrico Scholz <***@informatik.tu-chemnitz.de>
---
libstdio/fwrite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdio/fwrite.c b/libstdio/fwrite.c
index 464abdd..9f4e8e5 100644
--- a/libstdio/fwrite.c
+++ b/libstdio/fwrite.c
@@ -49,7 +49,7 @@ notlinewise:
} else
done=0;
for (i=done; i<len; ++i)
- if (fputc_unlocked(((char*)ptr)[i],stream)) {
+ if (fputc_unlocked(((char*)ptr)[i],stream) == EOF) {
res=len-i;
goto abort;
}
nearly everytime. Detected by the stdio/tst-fseek test.
Signed-off-by: Enrico Scholz <***@informatik.tu-chemnitz.de>
---
libstdio/fwrite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdio/fwrite.c b/libstdio/fwrite.c
index 464abdd..9f4e8e5 100644
--- a/libstdio/fwrite.c
+++ b/libstdio/fwrite.c
@@ -49,7 +49,7 @@ notlinewise:
} else
done=0;
for (i=done; i<len; ++i)
- if (fputc_unlocked(((char*)ptr)[i],stream)) {
+ if (fputc_unlocked(((char*)ptr)[i],stream) == EOF) {
res=len-i;
goto abort;
}
--
1.7.11.4
1.7.11.4