diff options
author | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-07-02 16:09:25 -0300 |
---|---|---|
committer | Douglas Schilling Landgraf <dougsland@redhat.com> | 2009-07-02 16:09:25 -0300 |
commit | a9ce895e4fbe314a0e7d2b967f576367a8c38acb (patch) | |
tree | 20fc4e599e713232d96f3e06654cc2c356fed7b1 /linux | |
parent | 245f6c63367b27a65d9c74ed93f133dfa0684d7b (diff) | |
download | mediapointer-dvb-s2-a9ce895e4fbe314a0e7d2b967f576367a8c38acb.tar.gz mediapointer-dvb-s2-a9ce895e4fbe314a0e7d2b967f576367a8c38acb.tar.bz2 |
remove redundant tests on unsigned
From: Roel Kluin <roel.kluin@gmail.com>
input, inp and i are unsigned. When negative they are wrapped and caught by the
other test.
Priority: normal
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
CC: Andy Walls <awalls@radix.net>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_v4l.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx18/cx18-ioctl.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-video.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c index ce64c6214..8986d967d 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c @@ -490,7 +490,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input) if (!av7110->analog_tuner_flags) return 0; - if (input < 0 || input >= 4) + if (input >= 4) return -EINVAL; av7110->current_input = input; diff --git a/linux/drivers/media/video/cx18/cx18-ioctl.c b/linux/drivers/media/video/cx18/cx18-ioctl.c index 65e2ef425..107b57880 100644 --- a/linux/drivers/media/video/cx18/cx18-ioctl.c +++ b/linux/drivers/media/video/cx18/cx18-ioctl.c @@ -613,7 +613,7 @@ int cx18_s_input(struct file *file, void *fh, unsigned int inp) if (ret) return ret; - if (inp < 0 || inp >= cx->nof_inputs) + if (inp >= cx->nof_inputs) return -EINVAL; if (inp == cx->active_input) { diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index 4212c4ec8..e7f78fcb8 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -1797,7 +1797,7 @@ static int saa7134_s_input(struct file *file, void *priv, unsigned int i) if (0 != err) return err; - if (i < 0 || i >= SAA7134_INPUT_MAX) + if (i >= SAA7134_INPUT_MAX) return -EINVAL; if (NULL == card_in(dev, i).name) return -EINVAL; |