svn commit: r223923 - head/usr.bin/calendar

Xin LI delphij at FreeBSD.org
Mon Jul 11 05:40:47 UTC 2011


Author: delphij
Date: Mon Jul 11 05:40:46 2011
New Revision: 223923
URL: http://svn.freebsd.org/changeset/base/223923

Log:
  Use a pair of parentheses to ensure right evaluation order.

Modified:
  head/usr.bin/calendar/pom.c

Modified: head/usr.bin/calendar/pom.c
==============================================================================
--- head/usr.bin/calendar/pom.c	Mon Jul 11 05:31:52 2011	(r223922)
+++ head/usr.bin/calendar/pom.c	Mon Jul 11 05:40:46 2011	(r223923)
@@ -155,7 +155,7 @@ fpom(int year, double utcoffset, double 
 	tomorrow = potm(days_tomorrow);		/* 31 December 00:00:01 */
 	olddir = today > tomorrow ? -1 : +1;
 
-	yeardays = 1 + isleap(year) ? DAYSPERLEAPYEAR : DAYSPERYEAR; /* reuse */
+	yeardays = 1 + (isleap(year) ? DAYSPERLEAPYEAR : DAYSPERYEAR); /* reuse */
 	for (d = 0; d <= yeardays; d++) {
 		today = potm(days_today);
 		tomorrow = potm(days_tomorrow);


More information about the svn-src-head mailing list