diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-21 13:33:24 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-21 13:33:24 +0000 |
commit | 61578deea0767122684d050c55740205fed904fa (patch) | |
tree | dc7fa05c421082b0547a6f4a86de239b220be15d /src | |
parent | f9e38155c62df2eab9a8321626d5186d19d65094 (diff) |
Keep gcc from whining when there is NOT an error (see the comments added)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6420 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/dns.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index ab7f00ff3..3f8cde523 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -61,9 +61,8 @@ enum QueryFlags /** Represents a dns resource record (rr) */ -class ResourceRecord +struct ResourceRecord { - public: QueryType type; /* Record type */ unsigned int rr_class; /* Record class */ unsigned long ttl; /* Time to live */ @@ -771,6 +770,7 @@ DNSInfo DNSRequest::ResultIsReady(DNSHeader &header, int length) /* This is just to keep _FORTIFY_SOURCE happy */ rr.type = DNS_QUERY_NONE; rr.rdlength = 0; + rr.ttl = 1; /* GCC is a whiney bastard -- see the XXX below. */ if (!(header.flags1 & FLAGS_MASK_QR)) return std::make_pair((unsigned char*)NULL,"Not a query result"); @@ -828,6 +828,7 @@ DNSInfo DNSRequest::ResultIsReady(DNSHeader &header, int length) if (length - i < 10) return std::make_pair((unsigned char*)NULL,"Incorrectly sized DNS reply"); + /* XXX: We actually initialise 'rr' here including its ttl field */ DNS::FillResourceRecord(&rr,&header.payload[i]); i += 10; if (rr.type != this->type) |