#endif
#include <string.h>
-#include "misc.h"
#include "statd.h"
#include "notlist.h"
{
notify_list *new;
- if (!(new = (notify_list *) xmalloc(sizeof(notify_list))))
- return NULL;
+ new = (notify_list *) xmalloc(sizeof(notify_list));
memset(new, 0, sizeof(*new));
NL_TIMES(new) = MAX_TRIES;
NL_STATE(new) = state;
- if (!(NL_MY_NAME(new) = xstrdup(my_name))
- || !(NL_MON_NAME(new) = xstrdup(mon_name))) {
- if (NL_MY_NAME(new))
- free(NL_MY_NAME(new));
- free(new);
- return NULL;
- }
+ NL_MY_NAME(new) = xstrdup(my_name);
+ NL_MON_NAME(new) = xstrdup(mon_name);
return new;
}
NL_MY_PROG(new) = NL_MY_PROG(entry);
NL_MY_VERS(new) = NL_MY_VERS(entry);
NL_MY_PROC(new) = NL_MY_PROC(entry);
- NL_ADDR(new) = NL_ADDR(entry);
memcpy(NL_PRIV(new), NL_PRIV(entry), SM_PRIV_SIZE);
return new;
free(NL_MY_NAME(entry));
if (NL_MON_NAME(entry))
free(NL_MON_NAME(entry));
+ free(entry->dns_name);
free(entry);
}
notify_list *lp;
for (lp = list; lp; lp = lp->next) {
- if (matchhostname(host, myname? NL_MY_NAME(lp) : NL_MON_NAME(lp)))
+ if (statd_matchhostname(host,
+ myname? NL_MY_NAME(lp) : NL_MON_NAME(lp)))
return lp;
}