From 64621b51662d54c21fad81579a20a7c7490632c2 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 27 Oct 2016 18:03:37 +0200 Subject: [PATCH] fixed coverty issues --- srslte/lib/ch_estimation/refsignal_ul.c | 10 +++------- srslte/lib/fec/viterbi37_port.c | 5 +++-- srslte/lib/fec/viterbi37_sse.c | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/srslte/lib/ch_estimation/refsignal_ul.c b/srslte/lib/ch_estimation/refsignal_ul.c index f203d6250..e2316e1dd 100644 --- a/srslte/lib/ch_estimation/refsignal_ul.c +++ b/srslte/lib/ch_estimation/refsignal_ul.c @@ -586,13 +586,9 @@ int srslte_refsignal_dmrs_pucch_gen(srslte_refsignal_ul_t *q, srslte_pucch_forma if (m == 1) { z_m = z_m_1; } - if (w) { - for (uint32_t n=0;ntmp_arg[n]+alpha*n)); - } - } else { - return SRSLTE_ERROR; - } + for (uint32_t n=0;ntmp_arg[n]+alpha*n)); + } } } ret = SRSLTE_SUCCESS; diff --git a/srslte/lib/fec/viterbi37_port.c b/srslte/lib/fec/viterbi37_port.c index caa2f26db..db2acc7e7 100644 --- a/srslte/lib/fec/viterbi37_port.c +++ b/srslte/lib/fec/viterbi37_port.c @@ -50,10 +50,11 @@ int init_viterbi37_port(void *p, int starting_state) { struct v37 *vp = p; uint32_t i; - clear_v37(vp); - if (p == NULL) return -1; + + clear_v37(vp); + for (i = 0; i < 64; i++) vp->metrics1.w[i] = 63; diff --git a/srslte/lib/fec/viterbi37_sse.c b/srslte/lib/fec/viterbi37_sse.c index cf7cefd26..d6dc6a9e2 100644 --- a/srslte/lib/fec/viterbi37_sse.c +++ b/srslte/lib/fec/viterbi37_sse.c @@ -69,12 +69,12 @@ void clear_v37_sse(struct v37 *vp) { int init_viterbi37_sse(void *p, int starting_state) { struct v37 *vp = p; uint32_t i; - - clear_v37_sse(vp); for(i=0;i<64;i++) vp->metrics1.c[i] = 63; + clear_v37_sse(vp); + vp->old_metrics = &vp->metrics1; vp->new_metrics = &vp->metrics2; vp->dp = vp->decisions;