summaryrefslogtreecommitdiff
path: root/src/dnsstub/dns_name.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
commit795ffc5e62e8ba383575dbcd9943a580d4bd3358 (patch)
treec128889056202b255e2f22afeb7717894d350862 /src/dnsstub/dns_name.c
parent5fadc0cbb8577c61d66bd6f19ceaf0507c11e23b (diff)
formatting changes
Manual format adjustments. Comment adjustments. Remove usage of the register keyword.
Diffstat (limited to 'src/dnsstub/dns_name.c')
-rw-r--r--src/dnsstub/dns_name.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dnsstub/dns_name.c b/src/dnsstub/dns_name.c
index db4565a..1802143 100644
--- a/src/dnsstub/dns_name.c
+++ b/src/dnsstub/dns_name.c
@@ -5,10 +5,10 @@
#include "uint_t.h"
/**
- @file dns_name.c
- @author djb, fefe, feh
- @source ucspi-tcp
- @brief DNS name query (ptr)
+ @file dns_name.c
+ @author djb, fefe, feh
+ @source ucspi-tcp
+ @brief DNS name query (ptr)
*/
static char *q = 0;
@@ -35,12 +35,13 @@ int dns_name_packet(stralloc *out, const char *buf, unsigned int len)
pos = dns_packet_copy(buf, len, pos, header, 10);
if (!pos) return DNS_ERR;
uint16_unpack_big(header + 8, &datalen);
- if (byte_equal(header, 2, DNS_T_PTR))
+ if (byte_equal(header, 2, DNS_T_PTR)) {
if (byte_equal(header + 2, 2, DNS_C_IN)) {
if (!dns_packet_getname(buf, len, pos, &q)) return DNS_ERR;
if (dns_domain_todot_cat(out, q) <= 0) return DNS_ERR;
return 1;
}
+ }
pos += datalen;
}