[PATCH] osmo-trx[master]: sigProcLib: Remove unreachable code and no-effect checks

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

Tom Tsou gerrit-no-reply at lists.osmocom.org
Tue Mar 28 21:44:37 UTC 2017


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

sigProcLib: Remove unreachable code and no-effect checks

Unreachable path and negative value inspection on unsigned
types.

Change-Id: If53b4b03550b0a7656c808cfe96806252153eb2f
Fixes: Coverity CID 165239, 165238, 165236
---
M Transceiver52M/sigProcLib.cpp
1 file changed, 2 insertions(+), 6 deletions(-)


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

diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 4c2222c..9673d99 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -1773,10 +1773,6 @@
   /* Normalize our channel gain */
   *amp = *amp / sync->gain;
 
-  /* Compenate for residual rotation with dual Laurent pulse */
-  if (sps == 4)
-    *amp = *amp * complex(0.0, 1.0);
-
   /* Compensate for residuate time lag */
   *toa = *toa - sync->toa;
 
@@ -1894,7 +1890,7 @@
   int rc, target, head, tail;
   CorrelationSequence *sync;
 
-  if ((tsc < 0) || (tsc > 7))
+  if (tsc > 7)
     return -SIGERR_UNSUPPORTED;
 
   target = 3 + 58 + 16 + 5;
@@ -1913,7 +1909,7 @@
   int rc, target, head, tail;
   CorrelationSequence *sync;
 
-  if ((tsc < 0) || (tsc > 7))
+  if (tsc > 7)
     return -SIGERR_UNSUPPORTED;
 
   target = 3 + 58 + 16 + 5;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If53b4b03550b0a7656c808cfe96806252153eb2f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Tom Tsou <tom at tsou.cc>



More information about the gerrit-log mailing list