ALSA: Cleanup redundant tests on unsigned
The variables are unsigned so the test `>= 0' is always true, the `< 0' test always fails. In these cases the other part of the test catches wrapped values. In dac_audio_write() there does not occur a test for wrapped values, but the test appears redundant. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -1040,8 +1040,7 @@ static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry,
|
||||
if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3)
|
||||
continue;
|
||||
|
||||
if ((reg < 0x49) && (reg >= 0) && (val <= 0xffffffff)
|
||||
&& (channel_id >= 0) && (channel_id <= 2) )
|
||||
if (reg < 0x49 && val <= 0xffffffff && channel_id <= 2)
|
||||
snd_emu10k1x_ptr_write(emu, reg, channel_id, val);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user