diff options
Diffstat (limited to 'net/sctp/debug.c')
-rw-r--r-- | net/sctp/debug.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sctp/debug.c b/net/sctp/debug.c index 95d7b15dad21..2e47eb2f05cb 100644 --- a/net/sctp/debug.c +++ b/net/sctp/debug.c | |||
@@ -159,6 +159,7 @@ static const char *const sctp_timer_tbl[] = { | |||
159 | "TIMEOUT_T4_RTO", | 159 | "TIMEOUT_T4_RTO", |
160 | "TIMEOUT_T5_SHUTDOWN_GUARD", | 160 | "TIMEOUT_T5_SHUTDOWN_GUARD", |
161 | "TIMEOUT_HEARTBEAT", | 161 | "TIMEOUT_HEARTBEAT", |
162 | "TIMEOUT_RECONF", | ||
162 | "TIMEOUT_SACK", | 163 | "TIMEOUT_SACK", |
163 | "TIMEOUT_AUTOCLOSE", | 164 | "TIMEOUT_AUTOCLOSE", |
164 | }; | 165 | }; |
@@ -166,7 +167,9 @@ static const char *const sctp_timer_tbl[] = { | |||
166 | /* Lookup timer debug name. */ | 167 | /* Lookup timer debug name. */ |
167 | const char *sctp_tname(const sctp_subtype_t id) | 168 | const char *sctp_tname(const sctp_subtype_t id) |
168 | { | 169 | { |
169 | if (id.timeout <= SCTP_EVENT_TIMEOUT_MAX) | 170 | BUILD_BUG_ON(SCTP_EVENT_TIMEOUT_MAX + 1 != ARRAY_SIZE(sctp_timer_tbl)); |
171 | |||
172 | if (id.timeout < ARRAY_SIZE(sctp_timer_tbl)) | ||
170 | return sctp_timer_tbl[id.timeout]; | 173 | return sctp_timer_tbl[id.timeout]; |
171 | return "unknown_timer"; | 174 | return "unknown_timer"; |
172 | } | 175 | } |