chiark / gitweb /
internal.h: Use `unsigned' for nextid
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 3 Dec 2016 16:54:44 +0000 (16:54 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 26 May 2020 19:23:40 +0000 (20:23 +0100)
This is constantly incremented and needs to wrap.  In practice I don't
believe any compilers spot the UB.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/internal.h

index 51e9ea205d46c9edd3b1513d118a84fe3bf6ebcb..923d43d1381d8e9ef9b703bd8f9f35208fb65de4 100644 (file)
@@ -371,7 +371,8 @@ struct adns__state {
   int configerrno;
   struct query_queue udpw, tcpw, childw, output, intdone;
   adns_query forallnext;
-  int nextid, tcpsocket;
+  unsigned nextid;
+  int tcpsocket;
   struct udpsocket { int af; int fd; } udpsockets[MAXUDP];
   int nudpsockets;
   vbuf tcpsend, tcprecv;