summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-01 12:36:11 -0500
committerDan McGee <dan@archlinux.org>2011-09-01 12:36:11 -0500
commitad051f7328cb8fed19070651aac314d64de1b815 (patch)
treefab7626512e64f2d5dd818a4bbe124d272e395ae /lib/libalpm/util.c
parent13072ef86ca8d9b3eb5b06c21211dc98d5a21732 (diff)
downloadpacman-ad051f7328cb8fed19070651aac314d64de1b815.tar.xz
_alpm_parsedate(): return time_t and not long
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 4cb31a8a..9bbac43b 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -1099,7 +1099,7 @@ off_t _alpm_strtoofft(const char *line)
return (off_t)result;
}
-long _alpm_parsedate(const char *line)
+time_t _alpm_parsedate(const char *line)
{
if(isalpha((unsigned char)line[0])) {
/* initialize to null in case of failure */
@@ -1109,7 +1109,7 @@ long _alpm_parsedate(const char *line)
setlocale(LC_TIME, "");
return mktime(&tmp_tm);
}
- return atol(line);
+ return (time_t)atol(line);
}
/**