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

@ -51,7 +51,8 @@ int scandir (const char *dir,
nl = ntmp;
}
if (!(etmp = (struct dirent *) malloc (sizeof *ent))) {
etmp = (struct dirent *) calloc (sizeof *ent, sizeof(char));
if (!etmp) {
err_no = 1;
break;
}