diff --git a/ChangeLog b/ChangeLog index 7eb18b8e..5b41c7f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -2009-06-11 Nicolas François +2009-06-12 Nicolas François + + * lib/fputsx.c: Compare the result of fgets() with the provided + buffer instead of NULL. + +2009-06-12 Nicolas François * lib/gshadow.c: Removed limitation on the length of the gshadow lines. diff --git a/lib/fputsx.c b/lib/fputsx.c index 9a55ba0e..c42b40bd 100644 --- a/lib/fputsx.c +++ b/lib/fputsx.c @@ -45,7 +45,7 @@ char *ep; while (cnt > 0) { - if (fgets (cp, cnt, f) == 0) { + if (fgets (cp, cnt, f) != cp) { if (cp == buf) { return 0; } else {