Fix warnings about uninitialized variables.

It was mostly harmless since strftime() only used %a and %b anyway.

Found with:   Coverity Prevent(tm)
CID:          7769
This commit is contained in:
Edwin Groothuis 2010-06-05 11:41:46 +00:00
parent 1962c0ae34
commit 73fd7c1d5d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208828

View File

@ -76,6 +76,7 @@ setnnames(void)
int i, l;
struct tm tm;
memset(&tm, sizeof(struct tm), 0);
for (i = 0; i < 7; i++) {
tm.tm_wday = i;
strftime(buf, sizeof(buf), "%a", &tm);
@ -103,6 +104,7 @@ setnnames(void)
fndays[i].len = strlen(buf);
}
memset(&tm, sizeof(struct tm), 0);
for (i = 0; i < 12; i++) {
tm.tm_mon = i;
strftime(buf, sizeof(buf), "%b", &tm);