]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multihandle: turn bool struct fields into bits
authorDaniel Stenberg <daniel@haxx.se>
Thu, 29 Dec 2022 16:43:36 +0000 (17:43 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 29 Dec 2022 23:16:53 +0000 (00:16 +0100)
Closes #10179

lib/multi.c
lib/multihandle.h

index b96ee7c7eacb0c0a3ec9619155dc15d16b65fa61..f08add3b0c68ba2275745affb86e50c8f03fb3d2 100644 (file)
@@ -3248,7 +3248,7 @@ CURLMcode curl_multi_setopt(struct Curl_multi *multi,
     multi->push_userp = va_arg(param, void *);
     break;
   case CURLMOPT_PIPELINING:
-    multi->multiplexing = va_arg(param, long) & CURLPIPE_MULTIPLEX;
+    multi->multiplexing = va_arg(param, long) & CURLPIPE_MULTIPLEX ? 1 : 0;
     break;
   case CURLMOPT_TIMERFUNCTION:
     multi->timer_cb = va_arg(param, curl_multi_timer_callback);
index 5a83656d5117cce0f248b1b771bcb322bbeb1864..be55fa9dcd30a11bed8402d8941ef24d05d32892 100644 (file)
@@ -162,13 +162,13 @@ struct Curl_multi {
 #define IPV6_DEAD    1
 #define IPV6_WORKS   2
   unsigned char ipv6_up;       /* IPV6_* defined */
-  bool multiplexing;           /* multiplexing wanted */
-  bool recheckstate;           /* see Curl_multi_connchanged */
-  bool in_callback;            /* true while executing a callback */
+  BIT(multiplexing);           /* multiplexing wanted */
+  BIT(recheckstate);           /* see Curl_multi_connchanged */
+  BIT(in_callback);            /* true while executing a callback */
 #ifdef USE_OPENSSL
-  bool ssl_seeded;
+  BIT(ssl_seeded);
 #endif
-  bool dead; /* a callback returned error, everything needs to crash and
+  BIT(dead); /* a callback returned error, everything needs to crash and
                 burn */
 };