From 0a76c6484cab8ca82a34ff7c7b00eda85d7610a1 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Wed, 9 Jun 2010 10:36:25 +0000 Subject: [PATCH] fix memset() calls. Found with: Coverity Prevent(tm) CID: 8531 --- usr.bin/calendar/locale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/calendar/locale.c b/usr.bin/calendar/locale.c index be7501cefa98..1f9227a9ff15 100644 --- a/usr.bin/calendar/locale.c +++ b/usr.bin/calendar/locale.c @@ -76,7 +76,7 @@ setnnames(void) int i, l; struct tm tm; - memset(&tm, sizeof(struct tm), 0); + memset(&tm, '\0', sizeof(struct tm)); for (i = 0; i < 7; i++) { tm.tm_wday = i; strftime(buf, sizeof(buf), "%a", &tm); @@ -104,7 +104,7 @@ setnnames(void) fndays[i].len = strlen(buf); } - memset(&tm, sizeof(struct tm), 0); + memset(&tm, '\0', sizeof(struct tm)); for (i = 0; i < 12; i++) { tm.tm_mon = i; strftime(buf, sizeof(buf), "%b", &tm);