X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Ffmt_compile.c;h=85ed7d74f2032e587ddc76c8a436a8b515729c45;hp=096f7dd62a46d1b31b696b0888ae14c8143a14ae;hb=b78007de9802005825390bee71dfce2306b42519;hpb=10eff860a28b96582526eb739fd0a55441669938 diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 096f7dd..85ed7d7 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -209,7 +209,7 @@ static struct ftable functable[] = { /* Add new component to the hash table */ #define NEWCOMP(cm,name) do { \ - cm = ((struct comp *) mh_xcalloc(1, sizeof (struct comp)));\ + cm = (mh_xcalloc(1, sizeof (struct comp)));\ cm->c_name = name;\ ncomp++;\ i = CHASH(name);\ @@ -328,8 +328,7 @@ fmt_compile(char *fstring, struct format **fmt) i = strlen(fstring)/2 + 1; if (i == 1) i++; - next_fp = formatvec = (struct format *)mh_xcalloc((size_t) i, - sizeof(struct format)); + next_fp = formatvec = mh_xcalloc(i, sizeof(struct format)); if (next_fp == NULL) adios(EX_OSERR, NULL, "unable to allocate format storage"); @@ -480,8 +479,7 @@ do_name(char *sp, int preprocess) if (cm->c_type & CT_ADDR) { CERROR("component used as both date and address"); } - cm->c_tws = (struct tws *) - mh_xcalloc((size_t) 1, sizeof(*cm->c_tws)); + cm->c_tws = mh_xcalloc(1, sizeof(*cm->c_tws)); fp->f_type = preprocess; PUTCOMP(sp); cm->c_type |= CT_DATE;