chg: use calloc

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

View File

@@ -349,7 +349,7 @@ pxsubs(const poly_t poly, int flags, int bperhx, unsigned long start, unsigned l
size *= cperhx;
if(!size || ~flags & P_SPACE) ++size; /* for trailing null */
if(!(sptr = string = (char *) malloc(size)))
if(!(sptr = string = (char *) calloc(size, sizeof(char))))
uerror("cannot allocate memory for string");
size = end - start;