diff options
-rw-r--r-- | sfeed.c | 2 | ||||
-rw-r--r-- | util.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -529,7 +529,7 @@ printfields(void) if (ctx.fields[FeedFieldTime].str.data) r = parsetime(ctx.fields[FeedFieldTime].str.data, &t); if (r != -1) - printf("%ld", (long)t); + printf("%lld", (long long)t); putchar(FieldSeparator); string_print_trimmed(&ctx.fields[FeedFieldTitle].str); putchar(FieldSeparator); @@ -218,12 +218,12 @@ parseline(char *line, char *fields[FieldLast]) int strtotime(const char *s, time_t *t) { - long l; + long long l; char *e; errno = 0; - l = strtol(s, &e, 10); - if (*s == '\0' || *e != '\0') + l = strtoll(s, &e, 10); + if (errno || *s == '\0' || *e) return -1; if (t) *t = (time_t)l; |