diff options
author | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2008-04-22 02:22:55 +0000 |
---|---|---|
committer | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2008-04-22 02:22:55 +0000 |
commit | bc4cdacb800d31d6e00724bf5b1493df0f256a0a (patch) | |
tree | aca3c09e84b247c35296b920b9d7b4bc85e246d8 /sys/dev/i2c/i2c_scan.c | |
parent | 2bc96dab1531b2830ccccdec1125719544f33601 (diff) |
unbreak the ignore_addrs logic (the 'continue' was obviously meant to affect
another preceding 'for' loop);
reported by krw and kettenis; better diff from millert; 'get it in' deraadt
Diffstat (limited to 'sys/dev/i2c/i2c_scan.c')
-rw-r--r-- | sys/dev/i2c/i2c_scan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index f70f4388a2c..cc53a4aaf02 100644 --- a/sys/dev/i2c/i2c_scan.c +++ b/sys/dev/i2c/i2c_scan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i2c_scan.c,v 1.125 2008/04/20 00:22:39 deraadt Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.126 2008/04/22 02:22:54 cnst Exp $ */ /* * Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org> @@ -961,7 +961,9 @@ iic_scan(struct device *self, struct i2cbus_attach_args *iba) for (addr = pl[j].start; addr <= pl[j].end; addr++) { for (k = 0; k < sizeof(ignore_addrs); k++) if (ignore_addrs[k] == addr) - continue; + break; + if (k < sizeof(ignore_addrs)) + continue; /* Perform RECEIVE BYTE command */ iic_acquire_bus(ic, 0); |