Skip to content

Commit

Permalink
isotpdump: fix compiler warning
Browse files Browse the repository at this point in the history
| isotpdump.c: In function ‘print_uds_message’:
| isotpdump.c:94:29: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
|   } else if (service >= 0x10 && service <= 0x3E ||
|              ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
| isotpdump.c:96:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
|       service >= 0xBA && service <= 0xBE)
|       ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

Signed-off-by: Marc Kleine-Budde <[email protected]>
  • Loading branch information
marckleinebudde committed Jun 3, 2019
1 parent f185160 commit 8ada533
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions isotpdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ void print_uds_message(int service, int nrc)
if ((service >= 0x50 && service <= 0x7E) || (service >= 0xC3 && service <= 0xC8)) {
flag = "[PSR]";
service = service - 0x40;
} else if (service >= 0x10 && service <= 0x3E
|| service >= 0x83 && service <= 0x88
|| service >= 0xBA && service <= 0xBE)
} else if ((service >= 0x10 && service <= 0x3E) ||
(service >= 0x83 && service <= 0x88) ||
(service >= 0xBA && service <= 0xBE))
flag = "[SRQ]";

switch(service) {
Expand Down

0 comments on commit 8ada533

Please sign in to comment.