aboutsummaryrefslogtreecommitdiffstats
path: root/ui-stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-stats.c')
-rw-r--r--ui-stats.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui-stats.c b/ui-stats.c
index 51dd6a2..f74dc33 100644
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -23,21 +23,21 @@ static void trunc_week(struct tm *tm)
23{ 23{
24 time_t t = timegm(tm); 24 time_t t = timegm(tm);
25 t -= ((tm->tm_wday + 6) % 7) * DAY_SECS; 25 t -= ((tm->tm_wday + 6) % 7) * DAY_SECS;
26 gmtime_r(&t, tm); 26 gmtime_r(&t, tm);
27} 27}
28 28
29static void dec_week(struct tm *tm) 29static void dec_week(struct tm *tm)
30{ 30{
31 time_t t = timegm(tm); 31 time_t t = timegm(tm);
32 t -= WEEK_SECS; 32 t -= WEEK_SECS;
33 gmtime_r(&t, tm); 33 gmtime_r(&t, tm);
34} 34}
35 35
36static void inc_week(struct tm *tm) 36static void inc_week(struct tm *tm)
37{ 37{
38 time_t t = timegm(tm); 38 time_t t = timegm(tm);
39 t += WEEK_SECS; 39 t += WEEK_SECS;
40 gmtime_r(&t, tm); 40 gmtime_r(&t, tm);
41} 41}
42 42
43static char *pretty_week(struct tm *tm) 43static char *pretty_week(struct tm *tm)
@@ -153,7 +153,7 @@ int cgit_find_stats_period(const char *expr, struct cgit_period **period)
153 if (periods[i].code == code || !strcmp(periods[i].name, expr)) { 153 if (periods[i].code == code || !strcmp(periods[i].name, expr)) {
154 if (period) 154 if (period)
155 *period = &periods[i]; 155 *period = &periods[i];
156 return i+1; 156 return i + 1;
157 } 157 }
158 return 0; 158 return 0;
159} 159}