DnsResolver/res_send.cpp - fixes bugprone-argument-comment warning
Fixes:
packages/modules/DnsResolver/res_send.cpp:868:38: error: argument name 'sigmask' in comment does not match parameter name '__mask' [bugprone-argument-comment,-warnings-as-errors]
int n = ppoll(&fds, 1, &timeout, /*sigmask=*/NULL);
^~~~~~~~~~~~
/*__mask=*/
bionic/libc/include/poll.h:64:129: note: '__mask' declared here
int ppoll(struct pollfd* _Nullable __fds, nfds_t __count, const struct timespec* _Nullable __timeout, const sigset_t* _Nullable __mask) __INTRODUCED_IN(21);
^
packages/modules/DnsResolver/res_send.cpp:907:67: error: argument name 'sigmask' in comment does not match parameter name '__mask' [bugprone-argument-comment,-warnings-as-errors]
const int n = ppoll(fdset.data(), fdset.size(), &timeout, /*sigmask=*/nullptr);
^~~~~~~~~~~~
/*__mask=*/
bionic/libc/include/poll.h:64:129: note: '__mask' declared here
int ppoll(struct pollfd* _Nullable __fds, nfds_t __count, const struct timespec* _Nullable __timeout, const sigset_t* _Nullable __mask) __INTRODUCED_IN(21);
Test: builds
Bug: 153035880
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iff535accfc09968f070a93daff9e4a5aded2e4bc
Merged-In: Iff535accfc09968f070a93daff9e4a5aded2e4bc
diff --git a/res_send.cpp b/res_send.cpp
index 910026a..0938ea9 100644
--- a/res_send.cpp
+++ b/res_send.cpp
@@ -866,7 +866,7 @@
else
timeout = evConsTime(0L, 0L);
struct pollfd fds = {.fd = sock, .events = events};
- int n = ppoll(&fds, 1, &timeout, /*sigmask=*/NULL);
+ int n = ppoll(&fds, 1, &timeout, /*__mask=*/NULL);
if (n == 0) {
LOG(INFO) << __func__ << ": " << sock << " retrying_poll timeout";
errno = ETIMEDOUT;
@@ -905,7 +905,7 @@
timespec timeout = (evCmpTime(*finish, start_time) > 0) ? evSubTime(*finish, start_time)
: evConsTime(0L, 0L);
std::vector<pollfd> fdset = extractUdpFdset(statp);
- const int n = ppoll(fdset.data(), fdset.size(), &timeout, /*sigmask=*/nullptr);
+ const int n = ppoll(fdset.data(), fdset.size(), &timeout, /*__mask=*/nullptr);
if (n <= 0) {
if (errno == EINTR && n < 0) continue;
if (n == 0) errno = ETIMEDOUT;