summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-09-18 16:55:23 -0500
committerDan McGee <dan@archlinux.org>2011-09-18 16:57:26 -0500
commit52c65fdfea7d174ad2f4d895c5783d936fdac7d7 (patch)
treec96c454b093688c554de23272de6a30df3c6058d /lib
parentc12fa4ab192da0a1cd5c61b2f70e154205401e6b (diff)
downloadpacman-52c65fdfea7d174ad2f4d895c5783d936fdac7d7.tar.xz
Ensure entire struct is zeroed in _alpm_parsedate()
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 58274ed1..f4fecabb 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -1101,7 +1101,8 @@ time_t _alpm_parsedate(const char *line)
{
if(isalpha((unsigned char)line[0])) {
/* initialize to null in case of failure */
- struct tm tmp_tm = { 0 };
+ struct tm tmp_tm;
+ memset(&tmp_tm, 0, sizeof(struct tm));
setlocale(LC_TIME, "C");
strptime(line, "%a %b %e %H:%M:%S %Y", &tmp_tm);
setlocale(LC_TIME, "");