]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
curl-util: fix error code check from curl_multi_socket_action
authorDave Reisner <dreisner@archlinux.org>
Sat, 27 Oct 2018 03:46:49 +0000 (23:46 -0400)
committerLennart Poettering <lennart@poettering.net>
Sat, 27 Oct 2018 10:04:45 +0000 (12:04 +0200)
After curl 7.20.0, this function never returns negative error codes.
Make this consistent with the other call to this function and only
compare against CURLM_OK.

src/import/curl-util.c

index 848bbd06692c62d74e8256b289b5ea50b0c9970e..539e2c28acd50c22a860306c2be8d21f2599aabf 100644 (file)
@@ -41,7 +41,7 @@ static int curl_glue_on_io(sd_event_source *s, int fd, uint32_t revents, void *u
         else
                 action = 0;
 
-        if (curl_multi_socket_action(g->curl, translated_fd, action, &k) < 0) {
+        if (curl_multi_socket_action(g->curl, translated_fd, action, &k) != CURLM_OK) {
                 log_debug("Failed to propagate IO event.");
                 return -EINVAL;
         }