From b36d9bf08f95ef570a29a519ddc6d97bf287d919 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 3 Dec 2016 16:54:44 +0000 Subject: [PATCH] internal.h: Use `unsigned' for nextid This is constantly incremented and needs to wrap. In practice I don't believe any compilers spot the UB. Signed-off-by: Ian Jackson --- src/internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/internal.h b/src/internal.h index 51e9ea2..923d43d 100644 --- a/src/internal.h +++ b/src/internal.h @@ -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; -- 2.30.2