From faab1893893fa0c97263a0edf965cf4f67bd1294 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sun, 5 Oct 2008 16:12:37 -0500 Subject: [PATCH] Fixed the select call The select call was moved to be in the if statement below it since the return code is not needed after that statement is processed. --- softsynth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/softsynth.c b/softsynth.c index d27113a..e964b70 100644 --- a/softsynth.c +++ b/softsynth.c @@ -147,8 +147,7 @@ void main_loop(struct synth_t *s) FD_SET(softFD, &set); tv.tv_sec = 0; tv.tv_usec = 500; - i = select(softFD + 1, &set, NULL, NULL, &tv); - if (i < 0) { + if (select(softFD + 1, &set, NULL, NULL, &tv) < 0) { if (errno == EINTR) continue; perror("Select failed");