mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
mkiss: remove redundant check for len > 0
The check for len > 0 is always true and hence is redundant as this check is already being made to execute the code inside the while-loop. Hence it is redundant and can be removed. Cleans up cppcheck warning: drivers/net/hamradio/mkiss.c:220: (warning) Identical inner 'if' condition is always true. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4d7b44833e
commit
6f5d295909
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ static int kiss_esc_crc(unsigned char *s, unsigned char *d, unsigned short crc,
|
|||
c = *s++;
|
||||
else if (len > 1)
|
||||
c = crc >> 8;
|
||||
else if (len > 0)
|
||||
else
|
||||
c = crc & 0xff;
|
||||
|
||||
len--;
|
||||
|
|
Loading…
Reference in a new issue