Skip to content

Commit b8257e8

Browse files
author
halx99
committed
Optimize typo.
1 parent ac4a598 commit b8257e8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

yasio/yasio.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ void io_service::perform_timers()
13291329
}
13301330
}
13311331

1332-
int io_service::do_evpoll(fd_set *fds_array)
1332+
int io_service::do_evpoll(fd_set *fdsa)
13331333
{
13341334
/*
13351335
@Optimize, swap nfds, make sure do_read & do_write event chould
@@ -1339,8 +1339,7 @@ but it's ok.
13391339
*/
13401340
int nfds = 0;
13411341
std::swap(nfds, this->outstanding_work_);
1342-
1343-
::memcpy(fds_array, this->fds_array_, sizeof(this->fds_array_));
1342+
::memcpy(fdsa, this->fds_array_, sizeof(this->fds_array_));
13441343
if (nfds <= 0)
13451344
{
13461345
auto wait_duration = get_wait_duration(MAX_WAIT_DURATION);
@@ -1352,9 +1351,7 @@ but it's ok.
13521351
YASIO_LOG("socket.select maxfdp:%d waiting... %ld milliseconds", maxfdp_,
13531352
timeout.tv_sec * 1000 + timeout.tv_usec / 1000);
13541353
#endif
1355-
1356-
nfds =
1357-
::select(this->maxfdp_, &(fds_array[read_op]), &(fds_array[write_op]), nullptr, &timeout);
1354+
nfds = ::select(this->maxfdp_, &(fdsa[read_op]), &(fdsa[write_op]), nullptr, &timeout);
13581355

13591356
#if _YASIO_VERBOS_LOG
13601357
YASIO_LOG("socket.select waked up, retval=%d", nfds);

0 commit comments

Comments
 (0)