chiark
/
gitweb
/
~ianmdlvl
/
adns.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
166de18
)
internal.h: Use `unsigned' for nextid
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 3 Dec 2016 16:54:44 +0000
(16:54 +0000)
committer
Ian 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
patch
|
blob
|
history
diff --git
a/src/internal.h
b/src/internal.h
index 51e9ea205d46c9edd3b1513d118a84fe3bf6ebcb..923d43d1381d8e9ef9b703bd8f9f35208fb65de4 100644
(file)
--- 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;