X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fscansbr.c;h=877bdef2d814e20e95456adb85e213ab37637d40;hp=ed163f3ee48ceb7c18a7e81d319095ee1d720627;hb=a8984c0e490cda653615bc0e1d4743ad8fe7a2a7;hpb=10eff860a28b96582526eb739fd0a55441669938 diff --git a/uip/scansbr.c b/uip/scansbr.c index ed163f3..877bdef 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -88,8 +88,7 @@ scan(FILE *inb, int innum, int outnum, char *fmtstr, int width, int curflg, width = MAXSCANL; } dat[3] = slwidth = width; - scanl = (char *) mh_xcalloc((size_t)(slwidth + 2), - SCAN_CHARWIDTH); /* probably for \n and \0 */ + scanl = mh_xcalloc(slwidth + 2, SCAN_CHARWIDTH); /* probably for \n and \0 */ /* Compile format string */ ncomps = fmt_compile(fmtstr, &fmt) + 1; FINDCOMP(datecomp, "date"); @@ -98,10 +97,8 @@ scan(FILE *inb, int innum, int outnum, char *fmtstr, int width, int curflg, datecomp = NULL; } - nxtbuf = compbuffers = (char **) mh_xcalloc((size_t) ncomps, - sizeof(char *)); - used_buf = (struct comp **) mh_xcalloc((size_t) (ncomps+1), - sizeof(struct comp *)); + nxtbuf = compbuffers = mh_xcalloc(ncomps, sizeof(char *)); + used_buf = mh_xcalloc(ncomps+1, sizeof(struct comp *)); /* NULL-terminate array */ used_buf += ncomps; *used_buf = NULL; @@ -259,7 +256,7 @@ finished: if (datecomp && !datecomp->c_text) { if (!datecomp->c_text) { if (!datecomp->c_tws) - datecomp->c_tws = (struct tws *) mh_xcalloc((size_t) 1, sizeof(*datecomp->c_tws)); + datecomp->c_tws = mh_xcalloc(1, sizeof(*datecomp->c_tws)); if (!datecomp->c_tws) adios(EX_OSERR, NULL, "unable to allocate tws buffer"); *datecomp->c_tws = *dlocaltime((time_t *) &st.st_mtime);