diff options
author | Yann Ylavic <ylavic@apache.org> | 2022-01-06 12:08:30 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2022-01-06 12:08:30 +0000 |
commit | ad6376b0f7a8f28bca94f9fae3067ed500034fde (patch) | |
tree | a27109adde0364a367eaae704f959b9e2d04290a | |
parent | 90f7b6937abc6b81ad460e2e4d0511233c9877de (diff) | |
download | apr-ad6376b0f7a8f28bca94f9fae3067ed500034fde.tar.gz |
apr_ring: Follow up to r1896535: Use APR_RING_{FIRST,LAST} macros.
hp->{next,prev} are APR_RING_{FIRST,LAST}(hp), so use them to make
APR_RING_SPLICE_{HEAD,TAIL}() read better.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1896747 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/apr_ring.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/apr_ring.h b/include/apr_ring.h index f09f2c02f..7280245e1 100644 --- a/include/apr_ring.h +++ b/include/apr_ring.h @@ -285,9 +285,9 @@ */ #define APR_RING_SPLICE_HEAD(hp, ep1, epN, elem, link) do { \ APR_RING_PREV((ep1), link) = APR_RING_SENTINEL((hp), elem, link);\ - APR_RING_NEXT((epN), link) = (hp)->next; \ - APR_RING_PREV((hp)->next, link) = (epN); \ - (hp)->next = (ep1); \ + APR_RING_NEXT((epN), link) = APR_RING_FIRST((hp)); \ + APR_RING_PREV(APR_RING_FIRST((hp)), link) = (epN); \ + APR_RING_FIRST((hp)) = (ep1); \ } while (0) /** @@ -301,9 +301,9 @@ */ #define APR_RING_SPLICE_TAIL(hp, ep1, epN, elem, link) do { \ APR_RING_NEXT((epN), link) = APR_RING_SENTINEL((hp), elem, link);\ - APR_RING_PREV((ep1), link) = (hp)->prev; \ - APR_RING_NEXT((hp)->prev, link) = (ep1); \ - (hp)->prev = (epN); \ + APR_RING_PREV((ep1), link) = APR_RING_LAST((hp)); \ + APR_RING_NEXT(APR_RING_LAST((hp)), link) = (ep1); \ + APR_RING_LAST((hp)) = (epN); \ } while (0) /** |