summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 243978cd..d723aee2 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -1107,7 +1107,7 @@ off_t _alpm_strtoofft(const char *line)
return (off_t)result;
}
-time_t _alpm_parsedate(const char *line)
+alpm_time_t _alpm_parsedate(const char *line)
{
char *end;
long long result;
@@ -1120,24 +1120,24 @@ time_t _alpm_parsedate(const char *line)
setlocale(LC_TIME, "C");
strptime(line, "%a %b %e %H:%M:%S %Y", &tmp_tm);
setlocale(LC_TIME, "");
- return mktime(&tmp_tm);
+ return (alpm_time_t)mktime(&tmp_tm);
}
result = strtoll(line, &end, 10);
if (result == 0 && end == line) {
/* line was not a number */
errno = EINVAL;
- return (time_t)0;
+ return 0;
} else if (errno == ERANGE) {
/* line does not fit in long long */
- return (time_t)0;
+ return 0;
} else if (*end) {
/* line began with a number but has junk left over at the end */
errno = EINVAL;
- return (time_t)0;
+ return 0;
}
- return (time_t)result;
+ return (alpm_time_t)result;
}
/**