fix memset() calls.
Found with: Coverity Prevent(tm) CID: 8531
This commit is contained in:
parent
aa64588d28
commit
0a76c6484c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208943
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user