diff options
Diffstat (limited to 'src/dns.c')
-rw-r--r-- | src/dns.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -7,14 +7,7 @@ #include <sys/socket.h> #include <sys/types.h> -#include <string.h> - #include "alloc.h" -#include "buffer.h" -#include "case.h" -#include "dnsresolv.h" -#include "exit.h" -#include "fmt.h" #include "ip.h" #include "str.h" #include "stralloc.h" @@ -80,8 +73,9 @@ static int dns_ipplus(ipalloc *ia, stralloc *sa, int pref) } error = 0; } - } else + } else { error = 1; + } /* Case 4: sa is fqdn and looking for IPv4 */ @@ -97,13 +91,14 @@ static int dns_ipplus(ipalloc *ia, stralloc *sa, int pref) } error = 0; } - } else + } else { error += 2; + } return error; } -int dns_ipalloc(ipalloc *ia, stralloc *sa) +static int dns_ipalloc(ipalloc *ia, stralloc *sa) { if (!ipalloc_readyplus(ia, 0)) return DNS_MEM; ia->len = 0; |