chiark / gitweb /
ads->configerrno now initialised (in setup.c). timercmp(,,<=) doesn't
[adns.git] / src / setup.c
index 99cf02a49ccda5fc7401222f331ee6c16494f3c3..99d1f088ebf3f7e12d838e5e92cb4af836ed6c96 100644 (file)
@@ -441,6 +441,7 @@ static int init_begin(adns_state *ads_r, adns_initflags flags, FILE *diagfile) {
 
   ads->iflags= flags;
   ads->diagfile= diagfile;
+  ads->configerrno= 0;
   LIST_INIT(ads->timew);
   LIST_INIT(ads->childw);
   LIST_INIT(ads->output);
@@ -450,10 +451,10 @@ static int init_begin(adns_state *ads_r, adns_initflags flags, FILE *diagfile) {
   adns__vbuf_init(&ads->tcpsend);
   adns__vbuf_init(&ads->tcprecv);
   ads->nservers= ads->nsortlist= ads->nsearchlist= ads->tcpserver= 0;
-  ads->tcpstate= server_disconnected;
-  ads->searchlist= 0;
   ads->searchndots= 1;
+  ads->tcpstate= server_disconnected;
   timerclear(&ads->tcptimeout);
+  ads->searchlist= 0;
 
   *ads_r= ads;
   return 0;