diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-30 22:36:08 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-30 22:36:08 +0000 |
commit | f96ddd39748f283768217fb1a3cdd3a7cbde353a (patch) | |
tree | 12929cfa52dcd3de5871efe355168f762a3740eb /src/dns.cpp | |
parent | 550f8bce1bf19ef186f27e574ea126113568d5e3 (diff) |
Started on -Wall - safe compile
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1570 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r-- | src/dns.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index 28b131586..bc2ca8c17 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -497,7 +497,7 @@ char* DNS::dns_getresult_s(const int cfd, char *res) { /* retrieve result of DNS i = 0; q = 0; l -= 12; - while (q < h.qdcount && i < l) { + while ((unsigned)q < h.qdcount && i < l) { if (h.payload[i] > 63) { /* pointer */ i += 6; /* skip pointer, _class and type */ q++; @@ -511,7 +511,7 @@ char* DNS::dns_getresult_s(const int cfd, char *res) { /* retrieve result of DNS } /* &h.payload[i] should now be the start of the first response */ curanswer = 0; - while (curanswer < h.ancount) { + while ((unsigned)curanswer < h.ancount) { q = 0; while (q == 0 && i < l) { if (h.payload[i] > 63) { /* pointer */ @@ -543,9 +543,9 @@ char* DNS::dns_getresult_s(const int cfd, char *res) { /* retrieve result of DNS } break; } - if (curanswer == h.ancount) + if ((unsigned)curanswer == h.ancount) return NULL; - if (i + rr.rdlength > l) + if ((unsigned)i + rr.rdlength > (unsigned)l) return NULL; if (rr.rdlength > 1023) return NULL; @@ -586,7 +586,7 @@ char* DNS::dns_getresult_s(const int cfd, char *res) { /* retrieve result of DNS return NULL; } memcpy(&alist->ip,&h.payload[i],4); - if (++curanswer >= h.ancount) + if ((unsigned)++curanswer >= h.ancount) break; i += rr.rdlength; { @@ -667,6 +667,7 @@ bool DNS::ReverseLookup(std::string ip) bool DNS::ForwardLookup(std::string host) { + return false; } bool DNS::HasResult() |