packet pool: cosmetic cleanups

pull/1083/head
Victor Julien 11 years ago
parent 4b9eecc7f6
commit a441441636

@ -69,7 +69,7 @@ static void PktPoolThreadDestroy(void * buf)
free(buf); free(buf);
} }
static void TmqhPacketpoolInit(void) static void TmqhPacketPoolInit(void)
{ {
SCMutexLock(&pkt_pool_thread_key_mutex); SCMutexLock(&pkt_pool_thread_key_mutex);
if (pkt_pool_thread_key_initialized) { if (pkt_pool_thread_key_initialized) {
@ -93,7 +93,7 @@ static void TmqhPacketpoolInit(void)
static PktPool *ThreadPacketPoolCreate(void) static PktPool *ThreadPacketPoolCreate(void)
{ {
TmqhPacketpoolInit(); TmqhPacketPoolInit();
/* Create a new pool for this thread. */ /* Create a new pool for this thread. */
PktPool* pool = (PktPool*)SCMallocAligned(sizeof(PktPool), CLS); PktPool* pool = (PktPool*)SCMallocAligned(sizeof(PktPool), CLS);
@ -114,7 +114,7 @@ static inline PktPool *GetThreadPacketPool(void)
{ {
PktPool* pool = (PktPool*)pthread_getspecific(pkt_pool_thread_key); PktPool* pool = (PktPool*)pthread_getspecific(pkt_pool_thread_key);
if (pool == NULL) if (pool == NULL)
pool = ThreadPacketPoolCreate(); pool = ThreadPacketPoolCreate();
return pool; return pool;
} }

Loading…
Cancel
Save