comparison libpurple/log.c @ 22690:f2045aae33b8

Keep valgrind happy by zeroing out the tm struct before we stuff our numbers in it and hand it off to mktime()
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 23 Apr 2008 14:58:55 +0000
parents a0608437ee61
children f15d9ded0c45
comparison
equal deleted inserted replaced
22689:1e7713b5e068 22690:f2045aae33b8
1756 1756
1757 logfound = 1; 1757 logfound = 1;
1758 lastoff = offset; 1758 lastoff = offset;
1759 1759
1760 g_snprintf(convostart, length, "%s", temp); 1760 g_snprintf(convostart, length, "%s", temp);
1761 memset(&tm, 0, sizeof(tm));
1761 sscanf(convostart, "%*s %s %d %d:%d:%d %d", 1762 sscanf(convostart, "%*s %s %d %d:%d:%d %d",
1762 month, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &tm.tm_year); 1763 month, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &tm.tm_year);
1763 /* Ugly hack, in case current locale is not English */ 1764 /* Ugly hack, in case current locale is not English */
1764 if (strcmp(month, "Jan") == 0) { 1765 if (strcmp(month, "Jan") == 0) {
1765 tm.tm_mon= 0; 1766 tm.tm_mon= 0;