aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-15 18:15:14 +0100
committerMax Kellermann <max@duempel.org>2013-01-15 18:16:38 +0100
commit4cfc4a5a9441479bc3f279edd40683d5e3eaf941 (patch)
tree6808575599038cf2b2121c5a8deba0bed1ff6549 /src
parent1c7ee737e65a553c5e0d7dc7fc29a42b70d43f1a (diff)
downloadmpd-4cfc4a5a9441479bc3f279edd40683d5e3eaf941.tar.gz
mpd-4cfc4a5a9441479bc3f279edd40683d5e3eaf941.tar.xz
mpd-4cfc4a5a9441479bc3f279edd40683d5e3eaf941.zip
input/Curl: simpler GPollFD initialisation
Using initializer list.
Diffstat (limited to 'src')
-rw-r--r--src/input/CurlInputPlugin.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx
index ef0e350f8..2b696b46e 100644
--- a/src/input/CurlInputPlugin.cxx
+++ b/src/input/CurlInputPlugin.cxx
@@ -337,11 +337,8 @@ curl_update_fds(void)
for (int fd = 0; fd <= max_fd; ++fd) {
gushort events = input_curl_fd_events(fd, &rfds, &wfds, &efds);
if (events != 0) {
- curl.fds.push_front(GPollFD());
- const auto poll_fd = &curl.fds.front();
- poll_fd->fd = fd;
- poll_fd->events = events;
- g_source_add_poll(curl.source, poll_fd);
+ curl.fds.push_front({fd, events, 0});
+ g_source_add_poll(curl.source, &curl.fds.front());
}
}
}