X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/64f5ae57aece3480ab79a93fc1b310e8b5ce22e9..537ff1ad3e8786a6c1750b94f9147ea2533952b3:/secnet.c diff --git a/secnet.c b/secnet.c index 024744c..756ab62 100644 --- a/secnet.c +++ b/secnet.c @@ -235,7 +235,7 @@ struct poll_interest *register_for_poll(void *st, beforepoll_fn *before, { struct poll_interest *i; - i=safe_malloc(sizeof(*i),"register_for_poll"); + NEW(i); i->before=before; i->after=after; i->state=st; @@ -331,7 +331,7 @@ static void run(void) if (shortfall) { allocdfds *= 2; allocdfds += shortfall; - fds=safe_realloc_ary(fds,sizeof(*fds),allocdfds, "run"); + REALLOC_ARY(fds,allocdfds); } shortfall=0; idx=0; @@ -475,6 +475,8 @@ int main(int argc, char **argv) { dict_t *config; + phase_hooks_init(); + enter_phase(PHASE_GETOPTS); parse_options(argc,argv);