On 21-Jun-2001 Davide Libenzi wrote:
> off = i / __NFDBITS;
> ! if (!(i & (__NFDBITS - 1))) {
> ! bits = BITS(fds, off);
> ! if (!bits) {
> ! i += __NFDBITS;
> ! continue;
> ! }
This is wrong.
> off = i / __NFDBITS;
> ! if (!(i & (__NFDBITS - 1))) {
> ! bits = BITS(fds, off);
> ! if (!bits) {
> ! i += __NFDBITS - 1;
> ! continue;
> ! }
This is right.
- Davide
--_=XFMail.1.4.7.Linux:20010621142352:1037=_
Content-Disposition: attachment; filename="select.c.diff"
Content-Transfer-Encoding: base64
Content-Description: select.c.diff
Content-Type: application/octet-stream; name=select.c.diff; SizeOnDisk=597
LS0tIHNlbGVjdC5vcmlnLmMJVGh1IEp1biAyMSAwODo1MjowNCAyMDAxCisrKyBzZWxlY3QuYwlU
aHUgSnVuIDIxIDEyOjA5OjI1IDIwMDEKQEAgLTE2NSw2ICsxNjUsNyBAQAogCXBvbGxfdGFibGUg
dGFibGUsICp3YWl0OwogCWludCByZXR2YWwsIGksIG9mZjsKIAlsb25nIF9fdGltZW91dCA9ICp0
aW1lb3V0OworCXVuc2lnbmVkIGxvbmcgYml0czsKIAogIAlyZWFkX2xvY2soJmN1cnJlbnQtPmZp
bGVzLT5maWxlX2xvY2spOwogCXJldHZhbCA9IG1heF9zZWxlY3RfZmQobiwgZmRzKTsKQEAgLTE4
Nyw3ICsxODgsMTQgQEAKIAkJCXN0cnVjdCBmaWxlICpmaWxlOwogCiAJCQlvZmYgPSBpIC8gX19O
RkRCSVRTOwotCQkJaWYgKCEoYml0ICYgQklUUyhmZHMsIG9mZikpKQorCQkJaWYgKCEoaSAmIChf
X05GREJJVFMgLSAxKSkpIHsKKwkJCQliaXRzID0gQklUUyhmZHMsIG9mZik7CisJCQkJaWYgKCFi
aXRzKSB7CisJCQkJCWkgKz0gX19ORkRCSVRTIC0gMTsKKwkJCQkJY29udGludWU7CisJCQkJfQor
CQkJfQorCQkJaWYgKCEoYml0ICYgYml0cykpCiAJCQkJY29udGludWU7CiAJCQlmaWxlID0gZmdl
dChpKTsKIAkJCW1hc2sgPSBQT0xMTlZBTDsK
--_=XFMail.1.4.7.Linux:20010621142352:1037=_--
End of MIME message
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/