summaryrefslogtreecommitdiffstats
path: root/common/srv.c
diff options
context:
space:
mode:
authorDavid Shaw <dshaw@jabberwocky.com>2009-07-23 20:56:56 +0200
committerDavid Shaw <dshaw@jabberwocky.com>2009-07-23 20:56:56 +0200
commit65b2edc20200d41b46dc698bcdd8dda38dc72e31 (patch)
tree03593f0fd0110fdd3cb8ea99ed05ea069366b228 /common/srv.c
parentTry a DNS-SD lookup to find a domain-specific LDAP server before (diff)
downloadgnupg2-65b2edc20200d41b46dc698bcdd8dda38dc72e31.tar.xz
gnupg2-65b2edc20200d41b46dc698bcdd8dda38dc72e31.zip
* srv.c (getsrv): Fix type-punning warning.
Diffstat (limited to '')
-rw-r--r--common/srv.c4
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;