diff options
author | edwin <edwin@FreeBSD.org> | 2010-06-09 10:36:25 +0000 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2010-06-09 10:36:25 +0000 |
commit | 946bad94504213222b8c7a23425b35a0e20a26bd (patch) | |
tree | 56d4079c66e4b357fba138574f9f019a6aae8e49 | |
parent | 30d565b63726049cd8fb29068c9c0e7e945d7f9a (diff) | |
download | FreeBSD-src-946bad94504213222b8c7a23425b35a0e20a26bd.zip FreeBSD-src-946bad94504213222b8c7a23425b35a0e20a26bd.tar.gz |
fix memset() calls.
Found with: Coverity Prevent(tm)
CID: 8531
-rw-r--r-- | usr.bin/calendar/locale.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/calendar/locale.c b/usr.bin/calendar/locale.c index be7501c..1f9227a 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); |