]> granicus.if.org Git - shadow/commitdiff
* lib/commonio.c: Avoid implicit conversion of pointers to
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 17 Mar 2010 23:59:47 +0000 (23:59 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Wed, 17 Mar 2010 23:59:47 +0000 (23:59 +0000)
booleans.
* lib/commonio.c: Ignore the return value of close when a
failure is reported.

ChangeLog
lib/commonio.c

index a8ca2904134c6c5a2d6f35fdb7b2d928bdc4b41c..8831df2128d76309677202d20b2501af93a3f5a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-03-17  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * lib/commonio.c: Avoid implicit conversion of pointers to
+       booleans.
+       * lib/commonio.c: Ignore the return value of close when a
+       failure is reported.
+
 2010-03-16  Nicolas François  <nicolas.francois@centraliens.net>
 
        * man/faillog.8.xml: Document the behavior in display mode of the
 
 2009-04-30  Nicolas François  <nicolas.francois@centraliens.net>
 
-       * lib/commonio.c: Ignore teh return values of fclose() and
+       * lib/commonio.c: Ignore the return values of fclose() and
        unlink() in case of failure of fopen_set_perms() or
        create_backup().
        * lib/commonio.c: Should the backup file be unlink'ed in case of
index 03b001e066aacac75ef359db4d81b8074f4698ca..fa37704c73f0b8fcdfc992a8eceb2202a89d1f99 100644 (file)
@@ -572,8 +572,8 @@ int commonio_open (struct commonio_db *db, int mode)
 #endif                         /* WITH_TCB */
                db->fp = fdopen (fd, db->readonly ? "r" : "r+");
                saved_errno = errno;
-               if (!db->fp) {
-                       close (fd);
+               if (NULL == db->fp) {
+                       (void) close (fd);
                }
        }
        errno = saved_errno;