Created
April 13, 2012 11:29
-
-
Save svetlyak40wt/2376077 to your computer and use it in GitHub Desktop.
Fixes error, related to isleap variable's constantness, in anacron.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -ru anacron-2.3/gregor.c /tmp/anacron-2.3/gregor.c | |
| --- anacron-2.3/gregor.c 2000-06-23 02:50:40.000000000 +0400 | |
| +++ /tmp/anacron-2.3/gregor.c 2012-04-13 11:23:24.000000000 +0400 | |
| @@ -65,7 +65,6 @@ | |
| { | |
| int dn; | |
| int i; | |
| - const int isleap; /* save three calls to leap() */ | |
| /* Some validity checks */ | |
| @@ -76,7 +75,8 @@ | |
| if (month > 12 || month < 1) return - 1; | |
| if (day < 1) return - 1; | |
| - isleap = leap(year); | |
| + /* save three calls to leap() */ | |
| + const int isleap = leap(year); | |
| if (month != 2) { | |
| if(day > days_in_month[month - 1]) return - 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment