Nothing fancy here, just some cleaning work.

Index: control.c
===================================================================
RCS file: /cvs/src/usr.sbin/ospf6d/control.c,v
retrieving revision 1.27
diff -u -p -r1.27 control.c
--- control.c   1 Sep 2018 19:21:10 -0000       1.27
+++ control.c   31 Dec 2019 16:57:07 -0000
@@ -64,7 +64,6 @@ control_check(char *path)
        return (0);
 }
 
-
 int
 control_init(char *path)
 {
@@ -127,10 +126,11 @@ control_listen(void)
 void
 control_cleanup(char *path)
 {
+       if (path == NULL)
+               return;
        event_del(&control_state.ev);
        event_del(&control_state.evt);
-       if (path)
-               unlink(path);
+       unlink(path);
 }
 
 /* ARGSUSED */
@@ -237,7 +237,7 @@ control_dispatch_imsg(int fd, short even
 {
        struct ctl_conn *c;
        struct imsg      imsg;
-       int              n;
+       ssize_t          n;
        unsigned int     ifidx;
        int              verbose;
 
@@ -289,7 +289,7 @@ control_dispatch_imsg(int fd, short even
                            sizeof(ifidx)) {
                                memcpy(&ifidx, imsg.data, sizeof(ifidx));
                                ospfe_iface_ctl(c, ifidx);
-                               imsg_compose(&c->iev.ibuf, IMSG_CTL_END, 0,
+                               imsg_compose_event(&c->iev, IMSG_CTL_END, 0,
                                    0, -1, NULL, 0);
                        }
                        break;
Index: ospfe.c
===================================================================
RCS file: /cvs/src/usr.sbin/ospf6d/ospfe.c,v
retrieving revision 1.59
diff -u -p -r1.59 ospfe.c
--- ospfe.c     28 Dec 2019 09:25:24 -0000      1.59
+++ ospfe.c     31 Dec 2019 16:57:07 -0000
@@ -175,10 +175,6 @@ ospfe(struct ospfd_conf *xconf, int pipe
        /* remove unneeded config stuff */
        conf_clear_redist_list(&oeconf->redist_list);
 
-       /* listen on ospfd control socket */
-       TAILQ_INIT(&ctl_conns);
-       control_listen();
-
        if ((pkt_ptr = calloc(1, READ_BUF_SIZE)) == NULL)
                fatal("ospfe");
 

Reply via email to