FST: Remove unreachable code in fst_session_handle_tear_down()
authorJouni Malinen <j@w1.fi>
Sat, 18 Jul 2015 15:09:57 +0000 (18:09 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 18 Jul 2015 16:06:34 +0000 (19:06 +0300)
fst_session_is_in_progress() is already checked as part of
fst_find_session_in_progress() before calling
fst_session_handle_action(). This is the only call path that can reach
fst_session_handle_tear_down() and as such, fst_session_is_in_progress()
cannot return 0 here.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/fst/fst_session.c

index 10fb247..2f42b12 100644 (file)
@@ -615,11 +615,6 @@ static void fst_session_handle_tear_down(struct fst_session *s,
                },
        };
 
-       if (!fst_session_is_in_progress(s)) {
-               fst_printf_session(s, MSG_WARNING, "no FST Setup to tear down");
-               return;
-       }
-
        if (plen < sizeof(*td)) {
                fst_printf_session(s, MSG_WARNING,
                                   "Too short FST Tear Down dropped");