summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-01-26 01:27:01 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-01-27 10:51:10 +0000
commitfc804d9cf1d23a616ea7bce19fc65198aa978e6e (patch)
tree62c83fd89f7ec6cd2f9ada69a4af98d30d79dc95 /src/vnet/tcp
parentd1660e980031882627fc1aa42b650c219831dad4 (diff)
Fix session/tcp coverity warnings
Change-Id: I5c404eacb4a6c1e16485a6656168d9171ff49a8b Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp')
-rwxr-xr-xsrc/vnet/tcp/tcp_debug.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/vnet/tcp/tcp_debug.h b/src/vnet/tcp/tcp_debug.h
index 5d4f7d6879d..e37b3cd9a9b 100755
--- a/src/vnet/tcp/tcp_debug.h
+++ b/src/vnet/tcp/tcp_debug.h
@@ -328,15 +328,18 @@ typedef enum _tcp_dbg_evt
#define TCP_EVT_RST_SENT_HANDLER(_tc, ...) \
{ \
- ELOG_TYPE_DECLARE (_e) = \
+if (_tc) \
{ \
- .format = "rst-tx: snd_nxt %d rcv_nxt %d", \
- .format_args = "i4i4", \
- }; \
- DECLARE_ETD(_tc, _e, 2); \
- ed->data[0] = _tc->snd_nxt - _tc->iss; \
- ed->data[1] = _tc->rcv_nxt - _tc->irs; \
- TCP_EVT_STATE_CHANGE_HANDLER(_tc); \
+ ELOG_TYPE_DECLARE (_e) = \
+ { \
+ .format = "rst-tx: snd_nxt %d rcv_nxt %d", \
+ .format_args = "i4i4", \
+ }; \
+ DECLARE_ETD(_tc, _e, 2); \
+ ed->data[0] = _tc->snd_nxt - _tc->iss; \
+ ed->data[1] = _tc->rcv_nxt - _tc->irs; \
+ TCP_EVT_STATE_CHANGE_HANDLER(_tc); \
+ } \
}
#define TCP_EVT_FIN_RCVD_HANDLER(_tc, ...) \