chg: use calloc

This commit is contained in:
iceman1001 2019-01-30 21:40:50 +01:00
commit ad72a424ef
15 changed files with 36 additions and 27 deletions

View file

@ -118,7 +118,7 @@ char * mtostr(const model_t *model) {
+ (checkstr && *checkstr ? strlen(checkstr) : 6)
+ (magicstr && *magicstr ? strlen(magicstr) : 6)
+ (model->name && *model->name ? 2 + strlen(model->name) : 6);
if ((string = malloc(size))) {
if ((string = calloc(size, sizeof(uint8_t)))) {
sprintf(strbuf, "\"%s\"", model->name);
sprintf(string,
"width=%lu "