[PATCH spice-common 2/3] ring: Remove short living temporary variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just a style change, the variable does not help readability.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 common/ring.h | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/common/ring.h b/common/ring.h
index 036c098..1ed3576 100644
--- a/common/ring.h
+++ b/common/ring.h
@@ -82,28 +82,22 @@ static inline void ring_remove(RingItem *item)
 
 static inline RingItem *ring_get_head(Ring *ring)
 {
-    RingItem *ret;
-
     spice_assert(ring->next != NULL && ring->prev != NULL);
 
     if (ring_is_empty(ring)) {
         return NULL;
     }
-    ret = ring->next;
-    return ret;
+    return ring->next;
 }
 
 static inline RingItem *ring_get_tail(Ring *ring)
 {
-    RingItem *ret;
-
     spice_assert(ring->next != NULL && ring->prev != NULL);
 
     if (ring_is_empty(ring)) {
         return NULL;
     }
-    ret = ring->prev;
-    return ret;
+    return ring->prev;
 }
 
 static inline RingItem *ring_next(Ring *ring, RingItem *pos)
-- 
2.13.6

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]