aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-03-10 22:31:17 +0100
committercbdev <cb@cbcdn.com>2020-03-10 22:31:17 +0100
commitc15ac89a33b6f6f51ac0c3da7a86dc43c8a9321a (patch)
tree34d18b2f6195246500d9130539c0d3026fb18751
parent04494e4543150567a461dd478ce9ccdc067131b2 (diff)
downloadmidimonster-c15ac89a33b6f6f51ac0c3da7a86dc43c8a9321a.tar.gz
midimonster-c15ac89a33b6f6f51ac0c3da7a86dc43c8a9321a.tar.bz2
midimonster-c15ac89a33b6f6f51ac0c3da7a86dc43c8a9321a.zip
Fix Coverity CID 354930 & CID 354929
-rw-r--r--midimonster.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/midimonster.c b/midimonster.c
index 3212f7f..2b0b7a0 100644
--- a/midimonster.c
+++ b/midimonster.c
@@ -377,7 +377,7 @@ static int core_loop(){
//process events
while(!shutdown_requested){
//rebuild fd set if necessary
- if(fd_set_dirty){
+ if(fd_set_dirty || !signaled_fds){
all_fds = fds_collect(&maxfd);
signaled_fds = realloc(signaled_fds, fds * sizeof(managed_fd));
if(!signaled_fds){
@@ -415,7 +415,7 @@ static int core_loop(){
#else
ts.tv_sec = tv.tv_sec;
ts.tv_nsec = tv.tv_usec * 1000;
- error = nanosleep(&ts, NULL);
+ nanosleep(&ts, NULL);
#endif
}