diff options
author | David Shaw <dshaw@jabberwocky.com> | 2009-07-23 20:56:56 +0200 |
---|---|---|
committer | David Shaw <dshaw@jabberwocky.com> | 2009-07-23 20:56:56 +0200 |
commit | 65b2edc20200d41b46dc698bcdd8dda38dc72e31 (patch) | |
tree | 03593f0fd0110fdd3cb8ea99ed05ea069366b228 /common/srv.c | |
parent | Try a DNS-SD lookup to find a domain-specific LDAP server before (diff) | |
download | gnupg2-65b2edc20200d41b46dc698bcdd8dda38dc72e31.tar.xz gnupg2-65b2edc20200d41b46dc698bcdd8dda38dc72e31.zip |
* srv.c (getsrv): Fix type-punning warning.
Diffstat (limited to '')
-rw-r--r-- | common/srv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/srv.c b/common/srv.c index 9c8977e8e..46d84b583 100644 --- a/common/srv.c +++ b/common/srv.c @@ -59,6 +59,7 @@ getsrv(const char *name,struct srventry **list) int r,srvcount=0; unsigned char *pt,*emsg; u16 count,dlen; + HEADER *header=(HEADER *)answer; *list=NULL; @@ -66,8 +67,7 @@ getsrv(const char *name,struct srventry **list) if(r<sizeof(HEADER) || r>2048) return -1; - if((((HEADER *)answer)->rcode)==NOERROR && - (count=ntohs(((HEADER *)answer)->ancount))) + if(header->rcode==NOERROR && (count=ntohs(header->ancount))) { int i,rc; |