[PATCH] osmo-trx[master]: Transceiver.cpp: use a define for the MAX_PACKET_LENGTH

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/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Thu Mar 8 22:46:30 UTC 2018


Review at  https://gerrit.osmocom.org/7170

Transceiver.cpp: use a define for the MAX_PACKET_LENGTH

No need to keep this value on stack.

Change-Id: If9ffb03b9e7b642f45732ba5938977bca271f1c7
---
M Transceiver52M/Transceiver.cpp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/70/7170/1

diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 8ebd9ed..7dc4c1c 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -657,10 +657,10 @@
 }
 
 
+#define MAX_PACKET_LENGTH 100
+
 void Transceiver::driveControl(size_t chan)
 {
-  int MAX_PACKET_LENGTH = 100;
-
   // check control socket
   char buffer[MAX_PACKET_LENGTH];
   int msgLen = -1;

-- 
To view, visit https://gerrit.osmocom.org/7170
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9ffb03b9e7b642f45732ba5938977bca271f1c7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>



More information about the gerrit-log mailing list