[Pkg-shadow-commits] r3121 - in upstream/trunk: . lib

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Wed Mar 17 23:59:48 UTC 2010


Author: nekral-guest
Date: 2010-03-17 23:59:47 +0000 (Wed, 17 Mar 2010)
New Revision: 3121

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/lib/commonio.c
Log:
	* lib/commonio.c: Avoid implicit conversion of pointers to
	booleans.
	* lib/commonio.c: Ignore the return value of close when a
	failure is reported.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2010-03-16 19:15:34 UTC (rev 3120)
+++ upstream/trunk/ChangeLog	2010-03-17 23:59:47 UTC (rev 3121)
@@ -1,3 +1,10 @@
+2010-03-17  Nicolas François  <nicolas.francois at 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 at centraliens.net>
 
 	* man/faillog.8.xml: Document the behavior in display mode of the
@@ -878,7 +885,7 @@
 
 2009-04-30  Nicolas François  <nicolas.francois at 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

Modified: upstream/trunk/lib/commonio.c
===================================================================
--- upstream/trunk/lib/commonio.c	2010-03-16 19:15:34 UTC (rev 3120)
+++ upstream/trunk/lib/commonio.c	2010-03-17 23:59:47 UTC (rev 3121)
@@ -572,8 +572,8 @@
 #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;




More information about the Pkg-shadow-commits mailing list