From d2aafd19e4fbe0ef8ec053e59085bcac85e64491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Sun, 11 Mar 2012 17:15:56 -0400 Subject: [PATCH] gmtime: reduce array size: days in month fit in 8 bits Change-Id: Idcebdf0ae120cfc82a1f471d0553d23ca36d7eef --- firmware/libc/gmtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/libc/gmtime.c b/firmware/libc/gmtime.c index 23b9c7b247..89960ce83b 100644 --- a/firmware/libc/gmtime.c +++ b/firmware/libc/gmtime.c @@ -22,6 +22,7 @@ * ****************************************************************************/ #include +#include #include "time.h" #define MINUTE_SECONDS 60 @@ -32,7 +33,7 @@ #define LEAP_YEAR_SECONDS 31622400 /* Days in each month */ -static int days_in_month[] = +static uint8_t days_in_month[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; static inline bool is_leapyear(int year)