From 4cfc4a5a9441479bc3f279edd40683d5e3eaf941 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Jan 2013 18:15:14 +0100 Subject: input/Curl: simpler GPollFD initialisation Using initializer list. --- src/input/CurlInputPlugin.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/input') diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx index ef0e350f..2b696b46 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()); } } } -- cgit v1.2.3