From 41c58589a58b46125ea9636bee486d5f7ad47372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Wed, 2 Oct 2013 21:35:19 +0200 Subject: [PATCH] Fix harmless off by one when walking file descriptors --- src/iomux_select.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iomux_select.c b/src/iomux_select.c index 7312415..bcc3fa3 100644 --- a/src/iomux_select.c +++ b/src/iomux_select.c @@ -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