Fix harmless off by one when walking file descriptors

This commit is contained in:
Nils O. Selåsdal
2013-10-02 21:35:19 +02:00
parent 27aa7ef3d6
commit 41c58589a5
+1 -1
View File
@@ -160,7 +160,7 @@ again:
if (rc == 0) //no fd's were ready, no more work to do
return event_cnt;
for (i = 0; rc >= 0 && i < mux->num_descriptors; i++) {
for (i = 0; rc > 0 && i < mux->num_descriptors; i++) {
unsigned int events = 0;
if (mux->descriptors[i] == NULL) { //callback might have deleted it