summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <funman@videolan.org>2012-03-11 17:20:35 -0400
committerBertrik Sikken <bertrik@sikken.nl>2012-03-18 10:09:08 +0100
commit24bd9d5393dbe39a5c6194877bc00ede669b1d5d (patch)
tree9959362ccb3f8b8cb265014521d992f069b1936d /firmware
parent2004f3eae42f04bef913672098b79f4a31c3f212 (diff)
downloadrockbox-24bd9d5393dbe39a5c6194877bc00ede669b1d5d.tar.gz
rockbox-24bd9d5393dbe39a5c6194877bc00ede669b1d5d.zip
gmtime: avoid a modulus
since WEEK_SECONDS = 7 * DAY_SECONDS, the result is the same Change-Id: Iec161fc2de626c99c1aabf80ab1d3243eac602d9
Diffstat (limited to 'firmware')
-rw-r--r--firmware/libc/gmtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/libc/gmtime.c b/firmware/libc/gmtime.c
index b6f75e2e51..e7ebdf0d90 100644
--- a/firmware/libc/gmtime.c
+++ b/firmware/libc/gmtime.c
@@ -53,7 +53,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *tm)
53 int year, i, mday, hour, min; 53 int year, i, mday, hour, min;
54 54
55 /* weekday */ 55 /* weekday */
56 tm->tm_wday = ((seconds % WEEK_SECONDS) / DAY_SECONDS + 4) % 7; 56 tm->tm_wday = (seconds / DAY_SECONDS + 4) % 7;
57 57
58 /* Year */ 58 /* Year */
59 year = 1970; 59 year = 1970;