From 62b575db671f2ae1856a058611f1b1304e5cad68 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 8 Dec 2017 18:32:32 +0100 Subject: [PATCH] bts-trx: trx_ctrl_cmd: Simplify var assignment logic Change-Id: I9250e3003cff24035440bbba3e1171650dc83209 --- src/osmo-bts-trx/trx_if.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 7030e3c0b..1ac21d59f 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -189,7 +189,7 @@ static int trx_ctrl_cmd(struct trx_l1h *l1h, int critical, const char *cmd, { struct trx_ctrl_msg *tcm; va_list ap; - int l, pending = 0; + int l, pending; if (!transceiver_available && !(!strcmp(cmd, "POWEROFF") || !strcmp(cmd, "POWERON"))) { @@ -198,8 +198,7 @@ static int trx_ctrl_cmd(struct trx_l1h *l1h, int critical, const char *cmd, return -EIO; } - if (!llist_empty(&l1h->trx_ctrl_list)) - pending = 1; + pending = !llist_empty(&l1h->trx_ctrl_list); /* create message */ tcm = talloc_zero(tall_bts_ctx, struct trx_ctrl_msg);