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

[ Available lists | Index of svn-src-head | Month of Jul 2011 | Week of 11 Jul 2011 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Xin LI <delphij@FreeBSD.org>
Date
11 Jul 2011 05:40:47
Subject
svn commit: r223923 - head/usr.bin/calendar
Message-ID
201107110540.p6B5ekvP077601@svn.freebsd.org


[ Hide this part ]
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);


Elapsed time: 0.057 seconds