This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: bts-trx: trx_ctrl_cmd: Simplify var assignment logic
......................................................................
bts-trx: trx_ctrl_cmd: Simplify var assignment logic
Change-Id: I9250e3003cff24035440bbba3e1171650dc83209
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 7030e3c..1ac21d5 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -189,7 +189,7 @@
 {
 	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 @@
 		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);
-- 
To view, visit https://gerrit.osmocom.org/5236
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9250e3003cff24035440bbba3e1171650dc83209
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>