Signed-off-by: hev <r...@hev.cc>
---
 src/domain-match.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/domain-match.c b/src/domain-match.c
index 8f29621..43862f8 100644
--- a/src/domain-match.c
+++ b/src/domain-match.c
@@ -673,18 +673,11 @@ int add_update_server(int flags,
        }
       else
        {
-         struct server *s;
-
          memset(serv, 0, sizeof(struct server));
          
          /* Add to the end of the chain, for order */
-         if (!daemon->servers)
-           daemon->servers = serv;
-         else
-           {
-             for (s = daemon->servers; s->next; s = s->next);
-             s->next = serv;
-           }
+         serv->next = daemon->servers;
+         daemon->servers = serv;
          
 #ifdef HAVE_LOOP
          serv->uid = rand32();
-- 
2.33.0


_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to