You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2008/06/03 02:07:01 UTC

svn commit: r662602 - /apr/apr/branches/1.3.x/include/apr_ring.h

Author: bojan
Date: Mon Jun  2 17:07:00 2008
New Revision: 662602

URL: http://svn.apache.org/viewvc?rev=662602&view=rev
Log:
Backport r662299 from the trunk.
Silence GCC strict aliasing warning.

Modified:
    apr/apr/branches/1.3.x/include/apr_ring.h

Modified: apr/apr/branches/1.3.x/include/apr_ring.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/include/apr_ring.h?rev=662602&r1=662601&r2=662602&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/include/apr_ring.h (original)
+++ apr/apr/branches/1.3.x/include/apr_ring.h Mon Jun  2 17:07:00 2008
@@ -157,7 +157,7 @@
  * @param link The name of the APR_RING_ENTRY in the element struct
  */
 #define APR_RING_SENTINEL(hp, elem, link)				\
-    (struct elem *)((char *)(hp) - APR_OFFSETOF(struct elem, link))
+    (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))
 
 /**
  * The first element of the ring