IMAP: fix Recurring check found by PVS Studio (V571)

The 'session_state->ssl_requested' condition was already verified in line 259

Change-Id: I6813176b2c235780785ff258377a7fd77a2cf24a
Reviewed-on: https://code.wireshark.org/review/12311
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Alexis La Goutte 2015-11-30 20:53:03 +01:00 committed by Anders Broman
parent d59335b906
commit 9bd05a274f
1 changed files with 1 additions and 2 deletions

View File

@ -257,8 +257,7 @@ dissect_imap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/* If not yet switched to TLS, check for STARTTLS. */
if (session_state->ssl_requested) {
if (!is_request && session_state->ssl_requested &&
strncmp(tokenbuf, "ok", tokenlen) == 0) {
if (!is_request && strncmp(tokenbuf, "ok", tokenlen) == 0) {
/* STARTTLS accepted, next reply will be TLS. */
ssl_starttls_ack(ssl_handle, pinfo, imap_handle);
}