unixDie("Unable to poll for new UDP events");
}
- for(struct pollfd &pfd : fds) {
+ for(auto &pfd : fds) {
if(pfd.revents & POLLIN) {
if((err=recvmmsg(pfd.fd, &buf[0], buf.size(), MSG_WAITFORONE, 0)) < 0 ) {
int err;
vector<struct pollfd> rfds= d_rfds;
- for(struct pollfd &pfd : rfds) {
+ for(auto &pfd : rfds) {
pfd.events = POLLIN;
pfd.revents = 0;
}
unixDie("Unable to poll for new UDP events");
}
- for(struct pollfd &pfd : rfds) {
+ for(auto &pfd : rfds) {
if(pfd.revents & POLLIN) {
sock=pfd.fd;
if((len=recvmsg(sock, &msgh, 0)) < 0 ) {
// move tsig keys
std::vector<struct TSIGKey> tkeys;
if (src->getTSIGKeys(tkeys)) {
- for(const struct TSIGKey& tk: tkeys) {
+ for(auto& tk: tkeys) {
if (!tgt->setTSIGKey(tk.name, tk.algorithm, tk.key)) throw PDNSException("Failed to feed TSIG key");
ntk++;
}