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

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sat Aug 30 18:31:57 UTC 2008


Author: nekral-guest
Date: 2008-08-30 18:31:56 +0000 (Sat, 30 Aug 2008)
New Revision: 2300

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/libmisc/mail.c
Log:
	* libmisc/mail.c: Added brackets and parenthesis.
	* libmisc/mail.c: Avoid assignments in comparisons.

Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-08-30 18:31:35 UTC (rev 2299)
+++ upstream/trunk/ChangeLog	2008-08-30 18:31:56 UTC (rev 2300)
@@ -1,3 +1,8 @@
+2008-08-26  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* libmisc/mail.c: Added brackets and parenthesis.
+	* libmisc/mail.c: Avoid assignments in comparisons.
+
 2008-08-26  Tobias  <tp at fonz.de>
 
 	* NEWS: Added support for uclibc.

Modified: upstream/trunk/libmisc/mail.c
===================================================================
--- upstream/trunk/libmisc/mail.c	2008-08-30 18:31:35 UTC (rev 2299)
+++ upstream/trunk/libmisc/mail.c	2008-08-30 18:31:56 UTC (rev 2300)
@@ -47,8 +47,9 @@
 	struct stat statbuf;
 	char *mailbox;
 
-	if (!getdef_bool ("MAIL_CHECK_ENAB"))
+	if (!getdef_bool ("MAIL_CHECK_ENAB")) {
 		return;
+	}
 
 	/*
 	 * Check incoming mail in Maildir format - J.
@@ -69,13 +70,18 @@
 		free (newmail);
 	}
 
-	if (!(mailbox = getenv ("MAIL")))
+	mailbox = getenv ("MAIL");
+	if (NULL == mailbox) {
 		return;
+	}
 
-	if (stat (mailbox, &statbuf) == -1 || statbuf.st_size == 0)
+	if (   (stat (mailbox, &statbuf) == -1)
+	    || (statbuf.st_size == 0)) {
 		puts (_("No mail."));
-	else if (statbuf.st_atime > statbuf.st_mtime)
+	} else if (statbuf.st_atime > statbuf.st_mtime) {
 		puts (_("You have mail."));
-	else
+	} else {
 		puts (_("You have new mail."));
+	}
 }
+




More information about the Pkg-shadow-commits mailing list