summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-03-04 16:46:21 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-03-04 16:46:21 +0100
commite1e73c0dc68e0d0fcca645909581ec4dd07a316b (patch)
tree78f6310c68f3d457ae36dfce6b26af2ec512327e
parent411a26dffab450a6df51eff57d6044c650609169 (diff)
-fix
-rw-r--r--src/util/dnsstub.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/util/dnsstub.c b/src/util/dnsstub.c
index 90c6d16b7..c2f2a441f 100644
--- a/src/util/dnsstub.c
+++ b/src/util/dnsstub.c
@@ -306,7 +306,6 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
int found;
struct sockaddr_storage addr;
socklen_t addrlen;
- socklen_t expectedlen;
struct GNUNET_TUN_DnsHeader *dns;
addrlen = sizeof(addr);
@@ -333,10 +332,9 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
struct sockaddr_in *ds_v4 = (struct sockaddr_in *) &ds->ss;
- expectedlen = sizeof(struct sockaddr_in);
if ((0 == memcmp (&v4->sin_addr,
&ds_v4->sin_addr,
- expectedlen)) &&
+ sizeof(struct sockaddr_in))) &&
(v4->sin_port == ds_v4->sin_port))
{
found = GNUNET_YES;
@@ -345,7 +343,6 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
}
else
{
- expectedlen = sizeof(struct sockaddr_in6);
struct sockaddr_in6 *v6 = (struct sockaddr_in6 *) &addr;
struct sockaddr_in6 *ds_v6 = (struct sockaddr_in6 *) &ds->ss;