ax25: non working tests on unsigned ax25_ctl.arg
vi include/linux/ax25.h +77
and note that ax25_ctl.arg is unsigned, should there maybe be a test
if (ax25_ctl.arg > MAX)
return -EINVAL;
(and what should MAX be then?)
Otherwise you may want to apply the cleanup patch below
Roel ------------------------------>8-------------8<--------------------------------- Remove redundant tests on unsigned
Signed-off-by Roel Kluin <[email protected]>
---
net/ax25/af_ax25.c +0 -4
@@ -418,14 +418,10 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg)break ;case AX25_T3 : -if (ax25_ctl.arg <0 ) -return -EINVAL ; ax25->t3 = ax25_ctl.arg *HZ ;break ;case AX25_IDLE : -if (ax25_ctl.arg <0 ) -return -EINVAL ; ax25->idle = ax25_ctl.arg *60 *HZ ;break ;