summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2017-11-07 10:48:22 +0000
committerFrediano Ziglio <fziglio@redhat.com>2017-11-07 13:11:19 +0000
commitc208ca85cd313fab9dff33266dde6441f7c67b24 (patch)
treef4c70170e1340facba17ea9630bcb19957bca597
parentc2f2096d900de69343bdc7a27ca7ecc22fcb1bc8 (diff)
ring: Remove __ring_remove function
Is just used by ring_remove, no reason to have it. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe de Dinechin <dinechin@redhat.com>
-rw-r--r--common/ring.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/common/ring.h b/common/ring.h
index 4b0e313..036c098 100644
--- a/common/ring.h
+++ b/common/ring.h
@@ -70,19 +70,14 @@ static inline void ring_add_before(RingItem *item, RingItem *pos)
ring_add(pos->prev, item);
}
-static inline void __ring_remove(RingItem *item)
-{
- item->next->prev = item->prev;
- item->prev->next = item->next;
- item->prev = item->next = NULL;
-}
-
static inline void ring_remove(RingItem *item)
{
spice_assert(item->next != NULL && item->prev != NULL);
spice_assert(item->next != item);
- __ring_remove(item);
+ item->next->prev = item->prev;
+ item->prev->next = item->next;
+ item->prev = item->next = NULL;
}
static inline RingItem *ring_get_head(Ring *ring)