diff options
author | mav <mav@FreeBSD.org> | 2008-11-22 14:48:40 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2008-11-22 14:48:40 +0000 |
commit | abfbbdbd081e0f32541bb1c74cd3a62fadc84f37 (patch) | |
tree | 5dd773ad5e8104089f87378d234a6906fc9b8731 /sys/dev/sound | |
parent | fbf7bda4ae92c353882069004b07e4b3edfcf5f0 (diff) | |
download | FreeBSD-src-abfbbdbd081e0f32541bb1c74cd3a62fadc84f37.zip FreeBSD-src-abfbbdbd081e0f32541bb1c74cd3a62fadc84f37.tar.gz |
Change check order to avoid array overrun.
Found with: Coverity Prevent(tm)
CID: 2497
Diffstat (limited to 'sys/dev/sound')
-rw-r--r-- | sys/dev/sound/pci/hda/hdac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 749ad4a..86d2c61 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -83,7 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20081115_0116" +#define HDA_DRV_TEST_REV "20081122_0117" SND_DECLARE_FILE("$FreeBSD$"); @@ -4762,7 +4762,7 @@ hdac_audio_trace_as_out(struct hdac_devinfo *devinfo, int as, int seq) nid_t min, res; /* Find next pin */ - for (i = seq; ases[as].pins[i] == 0 && i < 16; i++) + for (i = seq; i < 16 && ases[as].pins[i] == 0; i++) ; /* Check if there is no any left. If so - we succeded. */ if (i == 16) |