bts-trx: trx_ctrl_cmd: Simplify var assignment logic

Change-Id: I9250e3003cff24035440bbba3e1171650dc83209
This commit is contained in:
Pau Espin 2017-12-08 18:32:32 +01:00 committed by Harald Welte
parent 28cb32a74b
commit 62b575db67
1 changed files with 2 additions and 3 deletions

View File

@ -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);