u_char *tmpp;
if (!curp) {
- curp = xmalloc(blocksize);
- savp = xmalloc(blocksize);
+ curp = xcalloc(1, blocksize);
+ savp = xcalloc(1, blocksize);
} else {
tmpp = curp;
curp = savp;
const char *savep;
/* Start new linked list of format units. */
- tfs = xmalloc(sizeof(FS));
+ tfs = xcalloc(1, sizeof(FS));
if (!fshead)
fshead = tfs;
else
break;
/* Allocate a new format unit and link it in. */
- tfu = xmalloc(sizeof(FU));
+ tfu = xcalloc(1, sizeof(FU));
*nextfu = tfu;
nextfu = &tfu->nextfu;
tfu->reps = 1;
* conversion character gets its own.
*/
for (nconv = 0, fmtp = fu->fmt; *fmtp; nextpr = &pr->nextpr) {
- pr = xmalloc(sizeof(PR));
+ pr = xcalloc(1, sizeof(PR));
if (!fu->nextpr)
fu->nextpr = pr;
else