kill compiler warning on write(2)

This commit is contained in:
nick black 2020-03-07 19:20:23 -05:00
parent ac683e21d2
commit d44759fd25
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -66,9 +66,12 @@ pass_along(const ncinput* ni){
enqueue = &nq->next; enqueue = &nq->next;
pthread_mutex_unlock(&lock); pthread_mutex_unlock(&lock);
const uint64_t eventcount = 1; const uint64_t eventcount = 1;
write(input_eventfd, &eventcount, sizeof(eventcount)); int ret = 0;
if(write(input_eventfd, &eventcount, sizeof(eventcount)) < 0){
ret = -1;
}
pthread_cond_signal(&cond); pthread_cond_signal(&cond);
return 0; return ret;
} }
static int static int