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:
parent
2617c81a4b
commit
73931b7cc7
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue