input/vcd: fix parse_header() return value check.

Mixing tests for both a boolean and an SR_ERR at the same time is not
really a good idea.
parse_header() actually returns a boolean so only check if it returns FALSE.

This fixes the following gcc-5 warning:

src/input/vcd.c: In function 'receive':
src/input/vcd.c:506:34: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
   if (!parse_header(in, in->buf) != SR_OK)
                                  ^
This commit is contained in:
Aurelien Jacobs 2015-02-12 11:30:52 +01:00 committed by Uwe Hermann
parent 2617c81a4b
commit 73931b7cc7
1 changed files with 1 additions and 1 deletions

View File

@ -503,7 +503,7 @@ static int receive(struct sr_input *in, GString *buf)
if (!inc->got_header) {
if (!have_header(in->buf))
return SR_OK;
if (!parse_header(in, in->buf) != SR_OK)
if (!parse_header(in, in->buf))
/* There was a header in there, but it was malformed. */
return SR_ERR;