]> granicus.if.org Git - shadow/commitdiff
* lib/fputsx.c: Compare the result of fgets() with the provided
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 12 Jun 2009 20:20:45 +0000 (20:20 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 12 Jun 2009 20:20:45 +0000 (20:20 +0000)
buffer instead of NULL.

ChangeLog
lib/fputsx.c

index 7eb18b8eaff7d41295b565ac758be03fd3aed2d0..5b41c7f6840f0a0542007f387eb5fc70b3b37eb0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2009-06-11  Nicolas François  <nicolas.francois@centraliens.net>
+2009-06-12  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * lib/fputsx.c: Compare the result of fgets() with the provided
+       buffer instead of NULL.
+
+2009-06-12  Nicolas François  <nicolas.francois@centraliens.net>
 
        * lib/gshadow.c: Removed limitation on the length of the gshadow
        lines.
index 9a55ba0e11bc250ce29c42e0ffde9cd329f049db..c42b40bd5e389382ab4835db39080071b95a156b 100644 (file)
@@ -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 {