diff options
| author | Rafaël Carré <funman@videolan.org> | 2012-03-11 17:15:56 -0400 |
|---|---|---|
| committer | Rafaël Carré <funman@videolan.org> | 2012-03-11 17:19:48 -0400 |
| commit | d2aafd19e4fbe0ef8ec053e59085bcac85e64491 (patch) | |
| tree | 179e9edeca5ca85ef3fcad2183ddec29434bae19 | |
| parent | 727e8aa6817be8816bc32184f2e2eb36b90b4a9e (diff) | |
| download | rockbox-d2aafd19e4fbe0ef8ec053e59085bcac85e64491.zip rockbox-d2aafd19e4fbe0ef8ec053e59085bcac85e64491.tar.gz rockbox-d2aafd19e4fbe0ef8ec053e59085bcac85e64491.tar.bz2 rockbox-d2aafd19e4fbe0ef8ec053e59085bcac85e64491.tar.xz | |
gmtime: reduce array size: days in month fit in 8 bits
Change-Id: Idcebdf0ae120cfc82a1f471d0553d23ca36d7eef
| -rw-r--r-- | firmware/libc/gmtime.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/libc/gmtime.c b/firmware/libc/gmtime.c index 23b9c7b..89960ce 100644 --- a/firmware/libc/gmtime.c +++ b/firmware/libc/gmtime.c @@ -22,6 +22,7 @@ * ****************************************************************************/ #include <stdbool.h> +#include <stdint.h> #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) |