kernel/wait_for_objects: Fix copy/paste error in poll().
Seems none of the applications I tested yesterday actually used poll(), because it was completely broken by this. The previous code assigned this variable inside a malloc() call, though, which wasn't all that obvious either.
This commit is contained in:
parent
f666c0873e
commit
d497bf51a6
@ -1043,7 +1043,7 @@ _user_poll(struct pollfd *userfds, int numFDs, bigtime_t timeout,
|
||||
if (!fds.IsValid())
|
||||
return B_NO_MEMORY;
|
||||
|
||||
size_t bytes = 0;
|
||||
const size_t bytes = numFDs * sizeof(struct pollfd);
|
||||
if (numFDs != 0) {
|
||||
if (userfds == NULL || !IS_USER_ADDRESS(userfds))
|
||||
return B_BAD_ADDRESS;
|
||||
|
Loading…
Reference in New Issue
Block a user