We get a warning:
cplay.c: In function ‘find_adts_header’:
cplay.c:259:41: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
259 | if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0))
Resolve by adding a parentheses around "&" case
Signed-off-by: Vinod Koul <vkoul@kernel.org>
}
fseek(file, 0, SEEK_SET);
- if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0))
+ if ((buf[0] != 0xff) || ((buf[1] & 0xf0) != 0xf0))
return 0;
/* mpeg id */
switch (buf[1]>>3 & 0x1) {