aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/ChangeLog4
-rw-r--r--common/srv.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index 56e9712e2..c056c4c65 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-23 David Shaw <[email protected]>
+
+ * srv.c (getsrv): Fix type-punning warning.
+
2009-07-23 Werner Koch <[email protected]>
* util.h (GPG_ERR_NOT_ENABLED): New.
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;