From ad9505aae7f867c81ba97ba85fce801d1945ea9a Mon Sep 17 00:00:00 2001 From: Attilio Rao Date: Thu, 27 Dec 2012 12:53:46 +0000 Subject: [PATCH] Remove an unused var. Sponsored by: EMC / Isilon storage division MFC after: 3 days --- sys/sys/buf_ring.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/sys/buf_ring.h b/sys/sys/buf_ring.h index b33fc4776a8d..66f1607b64a2 100644 --- a/sys/sys/buf_ring.h +++ b/sys/sys/buf_ring.h @@ -77,7 +77,6 @@ buf_ring_enqueue(struct buf_ring *br, void *buf) { uint32_t prod_head, prod_next; uint32_t cons_tail; - int success; #ifdef DEBUG_BUFRING int i; for (i = br->br_cons_head; i != br->br_prod_head; @@ -98,10 +97,7 @@ buf_ring_enqueue(struct buf_ring *br, void *buf) critical_exit(); return (ENOBUFS); } - - success = atomic_cmpset_int(&br->br_prod_head, prod_head, - prod_next); - } while (success == 0); + } while (!atomic_cmpset_int(&br->br_prod_head, prod_head, prod_next)); #ifdef DEBUG_BUFRING if (br->br_ring[prod_head] != NULL) panic("dangling value in enqueue");