aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/trx_if.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-12-08 18:32:32 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-10 14:05:36 +0000
commit62b575db671f2ae1856a058611f1b1304e5cad68 (patch)
tree40542ee3fb83736646b1ab803194ccc45a08ce52 /src/osmo-bts-trx/trx_if.c
parent28cb32a74bee69f992f8b19babcae50a571de089 (diff)
bts-trx: trx_ctrl_cmd: Simplify var assignment logic
Diffstat (limited to 'src/osmo-bts-trx/trx_if.c')
-rw-r--r--src/osmo-bts-trx/trx_if.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 7030e3c0..1ac21d59 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);