Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88f87556 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski
Browse files

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: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: Iff535accfc09968f070a93daff9e4a5aded2e4bc
parent c37d081d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -865,7 +865,7 @@ retry:
    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;
@@ -904,7 +904,7 @@ static Result<std::vector<int>> udpRetryingPoll(res_state statp, const timespec*
        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;