summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-11-02 08:23:58 -0700
committerFlorin Coras <fcoras@cisco.com>2018-11-02 08:26:24 -0700
commit776f3d85ebd4edfb70b0f748890f1efd98d8474c (patch)
tree9a558d2a4151aa2ba09c04e1bb5a012050d6b338 /src/vnet/tcp/tcp.c
parenteb601240981a02f1baf0d52808503293382f8450 (diff)
tcp: coverity fixes
Change-Id: Ib15d629c5fde7849bfa3307f42659e920eb0f463 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index ba427b76b1a..1fb95b3ad3a 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1798,6 +1798,12 @@ tcp_scoreboard_replay (u8 * s, tcp_connection_t * tc, u8 verbose)
tcp_connection_t _dummy_tc, *dummy_tc = &_dummy_tc;
sack_block_t *block;
+ if (!TCP_SCOREBOARD_TRACE)
+ {
+ s = format (s, "scoreboard tracing not enabled");
+ return s;
+ }
+
if (!tc)
return s;
@@ -1806,13 +1812,7 @@ tcp_scoreboard_replay (u8 * s, tcp_connection_t * tc, u8 verbose)
scoreboard_init (&dummy_tc->sack_sb);
dummy_tc->rcv_opts.flags |= TCP_OPTS_FLAG_SACK;
-/* Since this is also accessible via decl. in tcp.h.
- * Otherwise, it is gated earlier by cli parser.
- */
-#if (!TCP_SCOREBOARD_TRACE)
- s = format (0, "scoreboard tracing not enabled");
- return s;
-#else
+#if TCP_SCOREBOARD_TRACE
trace = tc->sack_sb.trace;
trace_len = vec_len (tc->sack_sb.trace);
#endif