[svn] GnuPG - r5095 - trunk/common

svn author dshaw cvs at cvs.gnupg.org
Thu Jul 23 20:56:57 CEST 2009


Author: dshaw
Date: 2009-07-23 20:56:56 +0200 (Thu, 23 Jul 2009)
New Revision: 5095

Modified:
   trunk/common/ChangeLog
   trunk/common/srv.c
Log:
* srv.c (getsrv): Fix type-punning warning.


Modified: trunk/common/ChangeLog
===================================================================
--- trunk/common/ChangeLog	2009-07-23 18:28:54 UTC (rev 5094)
+++ trunk/common/ChangeLog	2009-07-23 18:56:56 UTC (rev 5095)
@@ -1,3 +1,7 @@
+2009-07-23  David Shaw  <dshaw at jabberwocky.com>
+
+	* srv.c (getsrv): Fix type-punning warning.
+
 2009-07-23  Werner Koch  <wk at g10code.com>
 
 	* util.h (GPG_ERR_NOT_ENABLED): New.

Modified: trunk/common/srv.c
===================================================================
--- trunk/common/srv.c	2009-07-23 18:28:54 UTC (rev 5094)
+++ trunk/common/srv.c	2009-07-23 18:56:56 UTC (rev 5095)
@@ -59,6 +59,7 @@
   int r,srvcount=0;
   unsigned char *pt,*emsg;
   u16 count,dlen;
+  HEADER *header=(HEADER *)answer;
 
   *list=NULL;
 
@@ -66,8 +67,7 @@
   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;
 




More information about the Gnupg-commits mailing list