[Python-checkins] python/nondist/sandbox/datetime datetime.c,1.15,1.16

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Thu, 21 Nov 2002 14:56:56 -0800


Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv1290

Modified Files:
	datetime.c 
Log Message:
is_leap():  It's already a boolean expression, so no need for a ternary
operator to force a 0/1 outcome.


Index: datetime.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/datetime.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** datetime.c	21 Nov 2002 22:55:25 -0000	1.15
--- datetime.c	21 Nov 2002 22:56:54 -0000	1.16
***************
*** 67,71 ****
  is_leap(int year)
  {
! 	return (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) ? 1 : 0;
  }
  
--- 67,71 ----
  is_leap(int year)
  {
! 	return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
  }