From e677da587044dfdea2cddf2b3edcb7f0d18cc247 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Mon, 26 May 2014 05:33:02 +0000 Subject: [PATCH] mod_fifo: Refactor in create_node() --- src/mod/applications/mod_fifo/mod_fifo.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index d2b8a4a520..d684773b19 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -995,7 +995,6 @@ static fifo_node_t *create_node(const char *name, uint32_t importance, switch_mu return NULL; } - switch_core_new_memory_pool(&pool); node = switch_core_alloc(pool, sizeof(*node)); @@ -1022,11 +1021,7 @@ static fifo_node_t *create_node(const char *name, uint32_t importance, switch_mu sql = switch_mprintf("select count(*) from fifo_outbound where fifo_name = '%q'", name); fifo_execute_sql_callback(mutex, sql, sql2str_callback, &cbt); node->member_count = atoi(outbound_count); - if (node->member_count > 0) { - node->has_outbound = 1; - } else { - node->has_outbound = 0; - } + node->has_outbound = (node->member_count > 0) ? 1 : 0; switch_safe_free(sql); node->importance = importance;