diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-07-18 11:02:36 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-07-18 11:23:45 -0400 |
commit | ae641971955f5ff4969a57cd7a011f41eb303bb4 (patch) | |
tree | a763818ebb00e415d5231c20fded5e52c48016a6 /src/or/relay.c | |
parent | 1047e7dcb05cbf4c98276d00c157cf0506b451d5 (diff) | |
download | tor-ae641971955f5ff4969a57cd7a011f41eb303bb4.tar.gz tor-ae641971955f5ff4969a57cd7a011f41eb303bb4.zip |
Unit tests for cell queues.
This removes some INLINE markers from functions that probably didn't
need them.
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 81132a131e..297f0f69e0 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -2089,7 +2089,7 @@ packed_cell_free_unchecked(packed_cell_t *cell) } /** Allocate and return a new packed_cell_t. */ -static INLINE packed_cell_t * +STATIC packed_cell_t * packed_cell_new(void) { ++total_cells_allocated; @@ -2100,6 +2100,8 @@ packed_cell_new(void) void packed_cell_free(packed_cell_t *cell) { + if (!cell) + return; packed_cell_free_unchecked(cell); } @@ -2210,7 +2212,7 @@ cell_queue_clear(cell_queue_t *queue) /** Extract and return the cell at the head of <b>queue</b>; return NULL if * <b>queue</b> is empty. */ -static INLINE packed_cell_t * +STATIC packed_cell_t * cell_queue_pop(cell_queue_t *queue) { packed_cell_t *cell = TOR_SIMPLEQ_FIRST(&queue->head); |