From 01002b07da36cb54f3059efc176ec705eddd0816 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 23 Jan 2020 11:12:52 -0500 Subject: [PATCH] TT#74850 clean up indentation by reversing logic Change-Id: I15140be111ad5e69d4c081f41db0b8ef81bb260b --- daemon/call.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 9493493c0..5467ba7bb 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -404,10 +404,10 @@ void kill_calls_timer(GSList *list, const char *url) { case XF_SEMS: for (csl = ca->monologues.head; csl; csl = csl->next) { cm = csl->data; - if (cm->tag.s && cm->tag.len) { - g_queue_push_tail(&xh->strings, g_string_chunk_insert(xh->c, url_buf)); - g_queue_push_tail(&xh->strings, str_chunk_insert(xh->c, &cm->tag)); - } + if (!cm->tag.s || !cm->tag.len) + continue; + g_queue_push_tail(&xh->strings, g_string_chunk_insert(xh->c, url_buf)); + g_queue_push_tail(&xh->strings, str_chunk_insert(xh->c, &cm->tag)); } break; case XF_CALLID: @@ -418,16 +418,17 @@ void kill_calls_timer(GSList *list, const char *url) { for (csl = ca->monologues.head; csl; csl = csl->next) { cm = csl->data; cd = cm->active_dialogue; - if (cm->tag.s && cm->tag.len && cd && cd->tag.s && cd->tag.len) { - g_queue_push_tail(&xh->strings, - g_string_chunk_insert(xh->c, url_buf)); - g_queue_push_tail(&xh->strings, - str_chunk_insert(xh->c, &ca->callid)); - g_queue_push_tail(&xh->strings, - str_chunk_insert(xh->c, &cm->tag)); - g_queue_push_tail(&xh->strings, - str_chunk_insert(xh->c, &cd->tag)); - } + if (!cm->tag.s || !cm->tag.len || !cd || !cd->tag.s || !cd->tag.len) + continue; + + g_queue_push_tail(&xh->strings, + g_string_chunk_insert(xh->c, url_buf)); + g_queue_push_tail(&xh->strings, + str_chunk_insert(xh->c, &ca->callid)); + g_queue_push_tail(&xh->strings, + str_chunk_insert(xh->c, &cm->tag)); + g_queue_push_tail(&xh->strings, + str_chunk_insert(xh->c, &cd->tag)); } break; }