_alpm_parsedate(): return time_t and not long

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-09-01 12:36:11 -05:00
parent 13072ef86c
commit ad051f7328
2 changed files with 3 additions and 3 deletions

View file

@ -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);
}
/**

View file

@ -120,7 +120,7 @@ int _alpm_splitname(const char *target, char **name, char **version,
unsigned long *name_hash);
unsigned long _alpm_hash_sdbm(const char *str);
off_t _alpm_strtoofft(const char *line);
long _alpm_parsedate(const char *line);
time_t _alpm_parsedate(const char *line);
int _alpm_raw_cmp(const char *first, const char *second);
int _alpm_raw_ncmp(const char *first, const char *second, size_t max);
int _alpm_access(alpm_handle_t *handle, const char *dir, const char *file, int amode);