X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/ecd50cc5f6c2a427e821483993678b78c94ffdfd..63621a81d16ab743de6b57d47578a9a2c670ad22:/sbr/fmt_compile.c diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 3930f8ca..aa555c62 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -280,11 +280,12 @@ static struct colormap colortable[] = { /* * Find a component in the hash table. */ -#define FINDCOMP(comp,name) \ - for (comp = wantcomp[CHASH(name)]; \ - comp && strcmp(comp->c_name,name); \ - comp = comp->c_next) \ - ; +#define FINDCOMP(comp,name) do { \ + for (comp = wantcomp[CHASH(name)]; \ + comp && strcmp(comp->c_name,name); \ + comp = comp->c_next) \ + ; \ + } while (0) /* Add new component to the hash table */ #define NEWCOMP(cm,name) do { \ @@ -968,7 +969,7 @@ fmt_freecomptext(void) for (i = 0; i < DIM(wantcomp); i++) for (cm = wantcomp[i]; cm; cm = cm->c_next) { - mh_xfree(cm->c_text); + free(cm->c_text); cm->c_text = NULL; } } @@ -1142,8 +1143,8 @@ free_component(struct comp *cm) { if (--cm->c_refcount <= 0) { /* Shouldn't ever be NULL, but just in case ... */ - mh_xfree(cm->c_name); - mh_xfree(cm->c_text); + free(cm->c_name); + free(cm->c_text); if (cm->c_type & CT_DATE) free(cm->c_tws); if (cm->c_type & CT_ADDR && cm->c_mn && cm->c_mn != &fmt_mnull)