api: report EINVAL if epoll_wait() is called with invalid maxevents

This commit is contained in:
Bert Belder 2017-12-04 23:21:39 +01:00
parent 227ee0e63d
commit a2f6609d57

View File

@ -105,6 +105,9 @@ int epoll_wait(HANDLE ephnd,
ep_port_t* port_info;
int result;
if (maxevents <= 0)
return_error(-1, ERROR_INVALID_PARAMETER);
if (init() < 0)
return -1;