chiark / gitweb /
Static buffers: ipaddr_getbuf: Rename some variables
[secnet.git] / secnet.c
index 024744c55e5c0ecdf84d0fc67381664ded27f67c..756ab62b78aa27f3d7734ec671ef4cb11da0c697 100644 (file)
--- 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);