summaryrefslogtreecommitdiff
path: root/src/dnsstub/dns_sortip.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_sortip.c
parent5fadc0cbb8577c61d66bd6f19ceaf0507c11e23b (diff)
formatting changes
Manual format adjustments. Comment adjustments. Remove usage of the register keyword.
Diffstat (limited to 'src/dnsstub/dns_sortip.c')
-rw-r--r--src/dnsstub/dns_sortip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dnsstub/dns_sortip.c b/src/dnsstub/dns_sortip.c
index 886e989..f319f53 100644
--- a/src/dnsstub/dns_sortip.c
+++ b/src/dnsstub/dns_sortip.c
@@ -3,10 +3,10 @@
#include "ip.h"
/**
- @file dns_sortip.c
- @authors djb, fefe, feh
- @source ucspi-tcp6
- @brief random sort of DNS servers per IP
+ @file dns_sortip.c
+ @authors djb, fefe, feh
+ @source ucspi-tcp6
+ @brief random sort of DNS servers per IP
*/
/* XXX: sort servers by configurable notion of closeness? */
@@ -19,7 +19,7 @@ void dns_sortip4(char *s, unsigned int n)
unsigned int i;
char tmp[4];
- n >>= 2; /* 4 byte per IPv4 address */
+ n >>= 2; // 4 byte per IPv4 address
while (n > 1) {
i = dns_random(n);
--n;
@@ -34,7 +34,7 @@ void dns_sortip6(char *s, unsigned int n)
unsigned int i;
char tmp[16];
- n >>= 4; /* 16 byte per IPv4 address */
+ n >>= 4; // 16 byte per IPv4 address
while (n > 1) {
i = dns_random(n);
--n;