[Pkg-shadow-commits] r2733 - in upstream/trunk: . libmisc

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Tue Apr 21 22:07:35 UTC 2009


Author: nekral-guest
Date: 2009-04-21 22:07:35 +0000 (Tue, 21 Apr 2009)
New Revision: 2733

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/libmisc/shell.c
Log:
	* libmisc/shell.c: Add brackets and parenthesis.
	* libmisc/shell.c: Avoid assignments in comparisons.
	* libmisc/shell.c: Re-indent.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-04-21 22:06:09 UTC (rev 2732)
+++ upstream/trunk/ChangeLog	2009-04-21 22:07:35 UTC (rev 2733)
@@ -1,5 +1,11 @@
-2009-04-20  Nicolas François  <nicolas.francois at centraliens.net>
+2009-04-21  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* libmisc/shell.c: Add brackets and parenthesis.
+	* libmisc/shell.c: Avoid assignments in comparisons.
+	* libmisc/shell.c: Re-indent.
+
+2009-04-21  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* lib/defines.h: Added MIN and MAX macros.
 	* libmisc/salt.c: Removed MIN and MAX macros.
 

Modified: upstream/trunk/libmisc/shell.c
===================================================================
--- upstream/trunk/libmisc/shell.c	2009-04-21 22:06:09 UTC (rev 2732)
+++ upstream/trunk/libmisc/shell.c	2009-04-21 22:07:35 UTC (rev 2733)
@@ -94,14 +94,15 @@
 	if (err == ENOEXEC) {
 		FILE *fp;
 
-		if ((fp = fopen (file, "r"))) {
+		fp = fopen (file, "r");
+		if (NULL != fp) {
 			if (getc (fp) == '#' && getc (fp) == '!') {
-				fclose (fp);
+				(void) fclose (fp);
 				execle ("/bin/sh", "sh",
-					file, (char *) 0, envp);
+				        file, (char *) 0, envp);
 				err = errno;
 			} else {
-				fclose (fp);
+				(void) fclose (fp);
 			}
 		}
 	}




More information about the Pkg-shadow-commits mailing list