vidcontrol: use calloc where appropriate
Reported by: kib
This commit is contained in:
parent
f2fa1b708a
commit
a9ccbd410e
@ -393,8 +393,8 @@ load_vt4mappingtable(unsigned int nmappings, FILE *f)
|
|||||||
if (nmappings == 0)
|
if (nmappings == 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
if ((t = malloc(sizeof *t * nmappings)) == NULL) {
|
if ((t = calloc(nmappings, sizeof(*t))) == NULL) {
|
||||||
warn("malloc");
|
warn("calloc");
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user