ssh: fix scan-build warnings

app-layer-ssh.c:165:5: warning: Value stored to 'input_len' is never read
    input_len -= 1;
    ^            ~
1 warning generated.

app-layer-ssh.c:160:5: warning: Value stored to 'input_len' is never read
    input_len -= 4;
    ^            ~
1 warning generated.
pull/867/head
Victor Julien 12 years ago
parent 0967f0777c
commit f6bb867df8

@ -140,6 +140,9 @@ static int SSHParseRecordHeader(SshState *state, SshHeader *header,
{
#ifdef DEBUG
BUG_ON(input_len != 6);
#else
if (input_len < 6)
SCReturnInt(-1);
#endif
/* input and input_len now point past initial line */
uint32_t pkt_len = 0;
@ -157,12 +160,12 @@ static int SSHParseRecordHeader(SshState *state, SshHeader *header,
SCLogDebug("pkt len: %"PRIu32, pkt_len);
input += 4;
input_len -= 4;
//input_len -= 4;
header->padding_len = *input;
input += 1;
input_len -= 1;
//input_len -= 1;
SCLogDebug("padding: %u", header->padding_len);

Loading…
Cancel
Save