Rename SIMPLEQ_* to STAILQ_* in /usr/src/sbin

Index: iked/iked.h
===================================================================
RCS file: /cvs/src/sbin/iked/iked.h,v
retrieving revision 1.179
diff -u -p -r1.179 iked.h
--- iked/iked.h 21 Dec 2020 22:49:36 -0000      1.179
+++ iked/iked.h 25 Dec 2020 16:19:24 -0000
@@ -531,9 +531,9 @@ RB_HEAD(iked_addrpool6, iked_sa);
 struct iked_certreq {
        struct ibuf                     *cr_data;
        uint8_t                          cr_type;
-       SIMPLEQ_ENTRY(iked_certreq)      cr_entry;
+       STAILQ_ENTRY(iked_certreq)       cr_entry;
 };
-SIMPLEQ_HEAD(iked_certreqs, iked_certreq);
+STAILQ_HEAD(iked_certreqs, iked_certreq);
 
 #define EAP_STATE_IDENTITY             (1)
 #define EAP_STATE_MSCHAPV2_CHALLENGE   (2)
Index: iked/ikev2.c
===================================================================
RCS file: /cvs/src/sbin/iked/ikev2.c,v
retrieving revision 1.292
diff -u -p -r1.292 ikev2.c
--- iked/ikev2.c        21 Dec 2020 22:49:36 -0000      1.292
+++ iked/ikev2.c        25 Dec 2020 16:19:24 -0000
@@ -3404,7 +3404,7 @@ ikev2_handle_certreq(struct iked* env, s
         * We could alternatively extract the CA from the peer certificate
         * to find a matching local one.
         */
-       if (SIMPLEQ_EMPTY(&msg->msg_certreqs)) {
+       if (STAILQ_EMPTY(&msg->msg_certreqs)) {
                if (sa->sa_policy->pol_certreqtype)
                        crtype = sa->sa_policy->pol_certreqtype;
                else
@@ -3413,8 +3413,8 @@ ikev2_handle_certreq(struct iked* env, s
                    crtype, 0, ibuf_data(env->sc_certreq),
                    ibuf_size(env->sc_certreq), PROC_CERT);
        } else {
-               while ((cr = SIMPLEQ_FIRST(&msg->msg_certreqs))) {
-                       if (SIMPLEQ_NEXT(cr, cr_entry) != NULL)
+               while ((cr = STAILQ_FIRST(&msg->msg_certreqs))) {
+                       if (STAILQ_NEXT(cr, cr_entry) != NULL)
                                more = 1;
                        else
                                more = 0;
@@ -3425,7 +3425,7 @@ ikev2_handle_certreq(struct iked* env, s
                            PROC_CERT);
 
                        ibuf_release(cr->cr_data);
-                       SIMPLEQ_REMOVE_HEAD(&msg->msg_certreqs, cr_entry);
+                       STAILQ_REMOVE_HEAD(&msg->msg_certreqs, cr_entry);
                        free(cr);
                }
        }
Index: iked/ikev2_msg.c
===================================================================
RCS file: /cvs/src/sbin/iked/ikev2_msg.c,v
retrieving revision 1.77
diff -u -p -r1.77 ikev2_msg.c
--- iked/ikev2_msg.c    29 Oct 2020 21:49:58 -0000      1.77
+++ iked/ikev2_msg.c    25 Dec 2020 16:19:24 -0000
@@ -95,7 +95,7 @@ ikev2_msg_cb(int fd, short event, void *
                return;
 
        TAILQ_INIT(&msg.msg_proposals);
-       SIMPLEQ_INIT(&msg.msg_certreqs);
+       STAILQ_INIT(&msg.msg_certreqs);
        msg.msg_fd = fd;
 
        if (hdr.ike_version == IKEV1_VERSION)
@@ -211,9 +211,9 @@ ikev2_msg_cleanup(struct iked *env, stru
                msg->msg_cp_addr6 = NULL;
 
                config_free_proposals(&msg->msg_proposals, 0);
-               while ((cr = SIMPLEQ_FIRST(&msg->msg_certreqs))) {
+               while ((cr = STAILQ_FIRST(&msg->msg_certreqs))) {
                        ibuf_release(cr->cr_data);
-                       SIMPLEQ_REMOVE_HEAD(&msg->msg_certreqs, cr_entry);
+                       STAILQ_REMOVE_HEAD(&msg->msg_certreqs, cr_entry);
                        free(cr);
                }
        }
Index: iked/ikev2_pld.c
===================================================================
RCS file: /cvs/src/sbin/iked/ikev2_pld.c,v
retrieving revision 1.114
diff -u -p -r1.114 ikev2_pld.c
--- iked/ikev2_pld.c    25 Nov 2020 22:17:14 -0000      1.114
+++ iked/ikev2_pld.c    25 Dec 2020 16:19:24 -0000
@@ -899,7 +899,7 @@ ikev2_pld_certreq(struct iked *env, stru
                return (-1);
        }
        cr->cr_type = cert.cert_type;
-       SIMPLEQ_INSERT_TAIL(&msg->msg_parent->msg_certreqs, cr, cr_entry);
+       STAILQ_INSERT_TAIL(&msg->msg_parent->msg_certreqs, cr, cr_entry);
 
        return (0);
 }
Index: iked/pfkey.c
===================================================================
RCS file: /cvs/src/sbin/iked/pfkey.c,v
retrieving revision 1.74
diff -u -p -r1.74 pfkey.c
--- iked/pfkey.c        4 Dec 2020 16:18:14 -0000       1.74
+++ iked/pfkey.c        25 Dec 2020 16:19:24 -0000
@@ -57,13 +57,13 @@ static struct event pfkey_timer_ev;
 static struct timeval pfkey_timer_tv;
 
 struct pfkey_message {
-       SIMPLEQ_ENTRY(pfkey_message)
+       STAILQ_ENTRY(pfkey_message)
                         pm_entry;
        uint8_t         *pm_data;
        ssize_t          pm_length;
 };
-SIMPLEQ_HEAD(, pfkey_message) pfkey_retry, pfkey_postponed =
-    SIMPLEQ_HEAD_INITIALIZER(pfkey_postponed);
+STAILQ_HEAD(, pfkey_message) pfkey_retry, pfkey_postponed =
+    STAILQ_HEAD_INITIALIZER(pfkey_postponed);
 
 struct pfkey_constmap {
        uint8_t          pfkey_id;
@@ -1316,7 +1316,7 @@ pfkey_reply(int sd, uint8_t **datap, ssi
                }
                pm->pm_data = data;
                pm->pm_length = len;
-               SIMPLEQ_INSERT_TAIL(&pfkey_postponed, pm, pm_entry);
+               STAILQ_INSERT_TAIL(&pfkey_postponed, pm, pm_entry);
                evtimer_add(&pfkey_timer_ev, &pfkey_timer_tv);
        }
 
@@ -1672,7 +1672,7 @@ pfkey_dispatch(int sd, short event, void
        }
 
        /* Try postponed requests first, so we do in-order processing */
-       if (!SIMPLEQ_EMPTY(&pfkey_postponed))
+       if (!STAILQ_EMPTY(&pfkey_postponed))
                pfkey_timer_cb(0, 0, env);
 
        pm.pm_data = data;
@@ -1683,7 +1683,7 @@ pfkey_dispatch(int sd, short event, void
                pmp->pm_data = data;
                pmp->pm_length = len;
                log_debug("%s: pfkey_process is busy, retry later", __func__);
-               SIMPLEQ_INSERT_TAIL(&pfkey_postponed, pmp, pm_entry);
+               STAILQ_INSERT_TAIL(&pfkey_postponed, pmp, pm_entry);
                evtimer_add(&pfkey_timer_ev, &pfkey_timer_tv);
        } else {
                free(data);
@@ -1696,22 +1696,22 @@ pfkey_timer_cb(int unused, short event, 
        struct iked             *env = arg;
        struct pfkey_message    *pm;
 
-       SIMPLEQ_INIT(&pfkey_retry);
-       while (!SIMPLEQ_EMPTY(&pfkey_postponed)) {
-               pm = SIMPLEQ_FIRST(&pfkey_postponed);
-               SIMPLEQ_REMOVE_HEAD(&pfkey_postponed, pm_entry);
+       STAILQ_INIT(&pfkey_retry);
+       while (!STAILQ_EMPTY(&pfkey_postponed)) {
+               pm = STAILQ_FIRST(&pfkey_postponed);
+               STAILQ_REMOVE_HEAD(&pfkey_postponed, pm_entry);
                if (pfkey_process(env, pm) == -1) {
                        log_debug("%s: pfkey_process is busy, retry later",
                            __func__);
-                       SIMPLEQ_INSERT_TAIL(&pfkey_retry, pm, pm_entry);
+                       STAILQ_INSERT_TAIL(&pfkey_retry, pm, pm_entry);
                } else {
                        free(pm->pm_data);
                        free(pm);
                }
        }
        /* move from retry to postponed */
-       SIMPLEQ_CONCAT(&pfkey_postponed, &pfkey_retry);
-       if (!SIMPLEQ_EMPTY(&pfkey_postponed))
+       STAILQ_CONCAT(&pfkey_postponed, &pfkey_retry);
+       if (!STAILQ_EMPTY(&pfkey_postponed))
                evtimer_add(&pfkey_timer_ev, &pfkey_timer_tv);
 }
 
Index: pfctl/parse.y
===================================================================
RCS file: /cvs/src/sbin/pfctl/parse.y,v
retrieving revision 1.707
diff -u -p -r1.707 parse.y
--- pfctl/parse.y       16 Dec 2020 18:01:16 -0000      1.707
+++ pfctl/parse.y       25 Dec 2020 16:19:24 -0000
@@ -1244,7 +1244,7 @@ tabledef  : TABLE '<' STRING '>' table_op
                                YYERROR;
                        }
                        free($3);
-                       for (ti = SIMPLEQ_FIRST(&$5.init_nodes); ti != NULL;
+                       for (ti = STAILQ_FIRST(&$5.init_nodes); ti != NULL;
                            ti = nti) {
                                if (ti->file)
                                        free(ti->file);
@@ -1252,7 +1252,7 @@ tabledef  : TABLE '<' STRING '>' table_op
                                        nh = h->next;
                                        free(h);
                                }
-                               nti = SIMPLEQ_NEXT(ti, entries);
+                               nti = STAILQ_NEXT(ti, entries);
                                free(ti);
                        }
                }
@@ -1260,14 +1260,14 @@ tabledef        : TABLE '<' STRING '>' table_op
 
 table_opts     :       {
                        bzero(&table_opts, sizeof table_opts);
-                       SIMPLEQ_INIT(&table_opts.init_nodes);
+                       STAILQ_INIT(&table_opts.init_nodes);
                }
                    table_opts_l
                        { $$ = table_opts; }
                | /* empty */
                        {
                        bzero(&table_opts, sizeof table_opts);
-                       SIMPLEQ_INIT(&table_opts.init_nodes);
+                       STAILQ_INIT(&table_opts.init_nodes);
                        $$ = table_opts;
                }
                ;
@@ -1327,7 +1327,7 @@ table_opt : STRING                {
                        if (!(ti = calloc(1, sizeof(*ti))))
                                err(1, "table_opt: calloc");
                        ti->host = $3;
-                       SIMPLEQ_INSERT_TAIL(&table_opts.init_nodes, ti,
+                       STAILQ_INSERT_TAIL(&table_opts.init_nodes, ti,
                            entries);
                        table_opts.init_addr = 1;
                }
@@ -1337,7 +1337,7 @@ table_opt : STRING                {
                        if (!(ti = calloc(1, sizeof(*ti))))
                                err(1, "table_opt: calloc");
                        ti->file = $2;
-                       SIMPLEQ_INSERT_TAIL(&table_opts.init_nodes, ti,
+                       STAILQ_INSERT_TAIL(&table_opts.init_nodes, ti,
                            entries);
                        table_opts.init_addr = 1;
                }
@@ -4127,7 +4127,7 @@ process_tabledef(char *name, struct tabl
 
        bzero(&ab, sizeof(ab));
        ab.pfrb_type = PFRB_ADDRS;
-       SIMPLEQ_FOREACH(ti, &opts->init_nodes, entries) {
+       STAILQ_FOREACH(ti, &opts->init_nodes, entries) {
                if (ti->file)
                        if (pfr_buf_load(&ab, ti->file, 0, popts)) {
                                if (errno)
Index: pfctl/pfctl_optimize.c
===================================================================
RCS file: /cvs/src/sbin/pfctl/pfctl_optimize.c,v
retrieving revision 1.47
diff -u -p -r1.47 pfctl_optimize.c
--- pfctl/pfctl_optimize.c      21 Jul 2020 14:10:51 -0000      1.47
+++ pfctl/pfctl_optimize.c      25 Dec 2020 16:19:24 -0000
@@ -1205,7 +1205,7 @@ add_opt_table(struct pfctl *pf, struct p
                        err(1, "calloc");
                (*tbl)->pt_refcnt = 1;
                (*tbl)->pt_buf->pfrb_type = PFRB_ADDRS;
-               SIMPLEQ_INIT(&(*tbl)->pt_nodes);
+               STAILQ_INIT(&(*tbl)->pt_nodes);
 
                /* This is just a temporary table name */
                snprintf((*tbl)->pt_name, sizeof((*tbl)->pt_name), "%s%d",
@@ -1235,7 +1235,7 @@ add_opt_table(struct pfctl *pf, struct p
                if ((ti->host = malloc(sizeof(*ti->host))) == NULL)
                        err(1, "malloc");
                memcpy(ti->host, &node_host, sizeof(*ti->host));
-               SIMPLEQ_INSERT_TAIL(&(*tbl)->pt_nodes, ti, entries);
+               STAILQ_INSERT_TAIL(&(*tbl)->pt_nodes, ti, entries);
        }
 
        (*tbl)->pt_rulecount++;
Index: pfctl/pfctl_parser.c
===================================================================
RCS file: /cvs/src/sbin/pfctl/pfctl_parser.c,v
retrieving revision 1.343
diff -u -p -r1.343 pfctl_parser.c
--- pfctl/pfctl_parser.c        15 May 2020 00:56:03 -0000      1.343
+++ pfctl/pfctl_parser.c        25 Dec 2020 16:19:24 -0000
@@ -1164,7 +1164,7 @@ print_tabledef(const char *name, int fla
                printf(" persist");
        if (flags & PFR_TFLAG_COUNTERS)
                printf(" counters");
-       SIMPLEQ_FOREACH(ti, nodes, entries) {
+       STAILQ_FOREACH(ti, nodes, entries) {
                if (ti->file) {
                        printf(" file \"%s\"", ti->file);
                        continue;
@@ -1177,7 +1177,7 @@ print_tabledef(const char *name, int fla
                                if (h->ifname)
                                        printf("@%s", h->ifname);
                        }
-                       nti = SIMPLEQ_NEXT(ti, entries);
+                       nti = STAILQ_NEXT(ti, entries);
                        if (nti != NULL && nti->file == NULL)
                                ti = nti;       /* merge lists */
                        else
@@ -1185,7 +1185,7 @@ print_tabledef(const char *name, int fla
                }
                printf(" }");
        }
-       if (addrs && SIMPLEQ_EMPTY(nodes))
+       if (addrs && STAILQ_EMPTY(nodes))
                printf(" { }");
        printf("\n");
 }
Index: pfctl/pfctl_parser.h
===================================================================
RCS file: /cvs/src/sbin/pfctl/pfctl_parser.h,v
retrieving revision 1.117
diff -u -p -r1.117 pfctl_parser.h
--- pfctl/pfctl_parser.h        21 Jul 2020 14:10:51 -0000      1.117
+++ pfctl/pfctl_parser.h        25 Dec 2020 16:19:24 -0000
@@ -166,9 +166,9 @@ struct node_queue_opt {
        }                        data;
 };
 
-SIMPLEQ_HEAD(node_tinithead, node_tinit);
+STAILQ_HEAD(node_tinithead, node_tinit);
 struct node_tinit {    /* table initializer */
-       SIMPLEQ_ENTRY(node_tinit)        entries;
+       STAILQ_ENTRY(node_tinit)         entries;
        struct node_host                *host;
        char                            *file;
 };

Reply via email to