BUG/MEDIUM: dns: don't store dns_build_query() result in the trash's length
authorWilly Tarreau <w@1wt.eu>
Wed, 22 Aug 2018 02:52:02 +0000 (04:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 22 Aug 2018 03:16:32 +0000 (05:16 +0200)
commitf6ee9dc61654f541cd05861ba9a3685fc185b575
treed7f94ca462526dcbb935d59b2d1bd7053b728c52
parent9c768fdca19b292c17099928e1efdf40bf53fc6e
BUG/MEDIUM: dns: don't store dns_build_query() result in the trash's length

By convenience or laziness we used to store dns_build_query()'s return code
into trash.data. The result checks applied there compare trash.data to -1
while it's now unsigned since commit 843b7cb ("MEDIUM: chunks: make the
chunk struct's fields match the buffer struct"). Let's clean this up
and test the result itself without storing it first.

No backport is needed.
src/dns.c