diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2010-06-05 11:41:46 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2010-06-05 11:41:46 +0000 |
commit | 73fd7c1d5d9825b620ee3c0c37b40827fa962415 (patch) | |
tree | 70526a916bb29fd1fd3862629ed02609f728f0d4 /usr.bin/calendar/locale.c | |
parent | 1962c0ae348938bbe22fa9d25598fdcbf89a1d9b (diff) | |
download | src-73fd7c1d5d9825b620ee3c0c37b40827fa962415.tar.gz src-73fd7c1d5d9825b620ee3c0c37b40827fa962415.zip |
Fix warnings about uninitialized variables.
It was mostly harmless since strftime() only used %a and %b anyway.
Found with: Coverity Prevent(tm)
CID: 7769
Notes
Notes:
svn path=/head/; revision=208828
Diffstat (limited to 'usr.bin/calendar/locale.c')
-rw-r--r-- | usr.bin/calendar/locale.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/calendar/locale.c b/usr.bin/calendar/locale.c index 2fe310117599..be7501cefa98 100644 --- a/usr.bin/calendar/locale.c +++ b/usr.bin/calendar/locale.c @@ -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); |