[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-commit] [2354] Fixed a brain fart.
From: |
Mike Rice |
Subject: |
[avr-libc-commit] [2354] Fixed a brain fart. |
Date: |
Fri, 19 Apr 2013 21:56:18 +0000 |
Revision: 2354
http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2354
Author: swfltek
Date: 2013-04-19 21:56:17 +0000 (Fri, 19 Apr 2013)
Log Message:
-----------
Fixed a brain fart. Function to compute length of month did not match
prototype.
Modified Paths:
--------------
trunk/avr-libc/include/time.h
trunk/avr-libc/libc/time/month_length.c
Modified: trunk/avr-libc/include/time.h
===================================================================
--- trunk/avr-libc/include/time.h 2013-04-19 21:35:53 UTC (rev 2353)
+++ trunk/avr-libc/include/time.h 2013-04-19 21:56:17 UTC (rev 2354)
@@ -288,7 +288,7 @@
/**
Return the length of month, given the year and month, where month is
in the range 1 to 12.
*/
- uint8_t length_of_month(int16_t year, uint8_t month);
+ uint8_t month_length(int16_t year, uint8_t month);
/**
Return the calendar week of year, where the first week is considered
to begin on the
Modified: trunk/avr-libc/libc/time/month_length.c
===================================================================
--- trunk/avr-libc/libc/time/month_length.c 2013-04-19 21:35:53 UTC (rev
2353)
+++ trunk/avr-libc/libc/time/month_length.c 2013-04-19 21:56:17 UTC (rev
2354)
@@ -35,10 +35,10 @@
#include <time.h>
-char
-month_length(int year, char month)
+uint8_t
+month_length(int year, uint8_t month)
{
if (month == 2) return 28 + is_leap_year(year);
-
+
return 30 + ((month + month / 8) & 1);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-libc-commit] [2354] Fixed a brain fart.,
Mike Rice <=