mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +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++;
|
c = *s++;
|
||||||
else if (len > 1)
|
else if (len > 1)
|
||||||
c = crc >> 8;
|
c = crc >> 8;
|
||||||
else if (len > 0)
|
else
|
||||||
c = crc & 0xff;
|
c = crc & 0xff;
|
||||||
|
|
||||||
len--;
|
len--;
|
||||||
|
|
Loading…
Reference in a new issue