/*
* 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 { \
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;
}
}
{
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)