]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CURLOPT: drop redundant `long` casts
authorViktor Szakats <commit@vsz.me>
Tue, 1 Jul 2025 09:31:01 +0000 (11:31 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 28 Jul 2025 08:32:13 +0000 (10:32 +0200)
Also:
- CURLOPT_HSTS_CTRL.md: sync macro definitions with `curl/curl.h`.
  Perhaps it'd be better to delete copies like this?
- keep existing casts within the documentation to make sure it applies
  to older curl versions as well.
- CURLOPT_IPRESOLVE.md: re-add a long cast to man page, for consistency
  with the above.

Closes #17791

32 files changed:
docs/examples/anyauthput.c
docs/examples/ghiper.c
docs/examples/hsts-preload.c
docs/examples/http3.c
docs/examples/imap-tls.c
docs/examples/pop3-tls.c
docs/examples/smtp-tls.c
docs/libcurl/opts/CURLOPT_HSTS_CTRL.md
docs/libcurl/opts/CURLOPT_HTTP_VERSION.md
docs/libcurl/opts/CURLOPT_IPRESOLVE.md
src/config2setopts.c
tests/client/hx_download.c
tests/client/hx_upload.c
tests/libtest/lib1511.c
tests/libtest/lib1513.c
tests/libtest/lib1555.c
tests/libtest/lib1568.c
tests/libtest/lib1593.c
tests/libtest/lib1599.c
tests/libtest/lib1662.c
tests/libtest/lib2309.c
tests/libtest/lib2502.c
tests/libtest/lib510.c
tests/libtest/lib540.c
tests/libtest/lib547.c
tests/libtest/lib552.c
tests/libtest/lib555.c
tests/libtest/lib579.c
tests/libtest/lib583.c
tests/libtest/lib590.c
tests/libtest/lib678.c
tests/libtest/lib694.c

index 7106c32eb6bccd4e027350d7e41126e81bb18d7f..c62250dce372c5cbdb0ee1d0c76ca02a3fefdc92 100644 (file)
@@ -142,7 +142,7 @@ int main(int argc, char **argv)
     /* tell libcurl we can use "any" auth, which lets the lib pick one, but it
        also costs one extra round-trip and possibly sending of all the PUT
        data twice!!! */
-    curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
+    curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
 
     /* set user name and password for the authentication */
     curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
index 7bc6bef0da9f199d687ec500e8d3ae65f3f87f42..7d8449cdf0a93f53d7e27b5e2ed5e7b867563ccf 100644 (file)
@@ -66,7 +66,7 @@
 #include <curl/curl.h>
 
 #define MSG_OUT g_print   /* Change to "g_error" to write to stderr */
-#define SHOW_VERBOSE 0    /* Set to non-zero for libcurl messages */
+#define SHOW_VERBOSE 0L   /* Set to non-zero for libcurl messages */
 #define SHOW_PROGRESS 0   /* Set to non-zero to enable progress callback */
 
 /* Global information, common to all connections */
@@ -311,7 +311,7 @@ static void new_conn(const char *url, struct GlobalInfo *g)
   curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
   curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
   curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
-  curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, (long)SHOW_VERBOSE);
+  curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, SHOW_VERBOSE);
   curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
   curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
   curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, SHOW_PROGRESS ? 0L : 1L);
index a25773f42dd7a90d8faa1c1bd67e438a08401b02..ba9fe87a94414eec46acb21e65dd1e70bd737715 100644 (file)
@@ -87,7 +87,7 @@ int main(void)
     struct state st = {0};
 
     /* enable HSTS for this handle */
-    curl_easy_setopt(curl, CURLOPT_HSTS_CTRL, (long)CURLHSTS_ENABLE);
+    curl_easy_setopt(curl, CURLOPT_HSTS_CTRL, CURLHSTS_ENABLE);
 
     /* function to call at first to populate the cache before the transfer */
     curl_easy_setopt(curl, CURLOPT_HSTSREADFUNCTION, hstsread);
index e278f2e313eae413c660a0e754d770ecc6b9cfc9..573ea20d2b488bb68248917ac4bf8183cdc50627 100644 (file)
@@ -38,8 +38,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Use HTTP/3 but fallback to earlier HTTP if necessary */
-    curl_easy_setopt(curl, CURLOPT_HTTP_VERSION,
-                     (long)CURL_HTTP_VERSION_3);
+    curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3);
 
     /* Perform the request, res gets the return code */
     res = curl_easy_perform(curl);
index 838923b334c5889c4999f7e9e67a2a47b78fcbf2..8fbc96bb55c3ad171c06036864c2a82894799971 100644 (file)
@@ -57,7 +57,7 @@ int main(void)
      * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the
      * transfer continues anyway - see the security discussion in the libcurl
      * tutorial for more details. */
-    curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+    curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
 
     /* If your server does not have a valid certificate, then you can disable
      * part of the Transport Layer Security protection by setting the
index 7c2d824d043e78e787b6bdea3feecb34d14f18b2..b2f504c475d8e829fc158011e09533874212bf20 100644 (file)
@@ -56,7 +56,7 @@ int main(void)
      * using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
      * continues anyway - see the security discussion in the libcurl tutorial
      * for more details. */
-    curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+    curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
 
     /* If your server does not have a valid certificate, then you can disable
      * part of the Transport Layer Security protection by setting the
index fd4e385023a5f76139b487b01fe813cbb324cec5..34a00bd548352b56138aa399a1d71b7476f2ebd9 100644 (file)
@@ -110,7 +110,7 @@ int main(void)
      * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the
      * transfer continues anyway - see the security discussion in the libcurl
      * tutorial for more details. */
-    curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+    curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
 
     /* If your server does not have a valid certificate, then you can disable
      * part of the Transport Layer Security protection by setting the
index 8305a62a395cf8535d24879e7546e5a9b12bada7..3ed7f3c5970184458d7b95c65aa2efdecc7d818a 100644 (file)
@@ -23,8 +23,8 @@ CURLOPT_HSTS_CTRL - control HSTS behavior
 ~~~c
 #include <curl/curl.h>
 
-#define CURLHSTS_ENABLE       (1<<0)
-#define CURLHSTS_READONLYFILE (1<<1)
+#define CURLHSTS_ENABLE       (long)(1<<0)
+#define CURLHSTS_READONLYFILE (long)(1<<1)
 
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTS_CTRL, long bitmask);
 ~~~
index 63ad0c08a69b1134402635142626c07d53199c14..618a7123e91894c663266b36e6159b743fafc8d4 100644 (file)
@@ -105,8 +105,7 @@ int main(void)
   if(curl) {
     CURLcode ret;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    curl_easy_setopt(curl, CURLOPT_HTTP_VERSION,
-                     (long)CURL_HTTP_VERSION_2TLS);
+    curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_2TLS);
     ret = curl_easy_perform(curl);
     if(ret == CURLE_HTTP_RETURNED_ERROR) {
       /* an HTTP response error problem */
index 1b761c961b560e1e35e49063a820af8d0f787507..1b13e3641d7643e3205452e71fffb09b591164c7 100644 (file)
@@ -66,7 +66,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     /* of all addresses example.com resolves to, only IPv6 ones are used */
-    curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
+    curl_easy_setopt(curl, CURLOPT_IPRESOLVE, (long)CURL_IPRESOLVE_V6);
 
     res = curl_easy_perform(curl);
 
index 10c7b9a703855d2f6e5c6982400c1f66682217a6..92a9b19e100a021f21792dc75b04449da7b23313 100644 (file)
@@ -751,7 +751,7 @@ static CURLcode proxy_setopts(struct OperationConfig *config, CURL *curl)
 
   /* new in libcurl 7.10.6 */
   if(config->proxyanyauth)
-    my_setopt_bitmask(curl, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
+    my_setopt_bitmask(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
   else if(config->proxynegotiate)
     my_setopt_bitmask(curl, CURLOPT_PROXYAUTH, CURLAUTH_GSSNEGOTIATE);
   else if(config->proxyntlm)
index e168b93dafc13ab235563145087e3df7ec51035c..59e2b036d1c6289088ec3a7b66eaca5057e4ff3b 100644 (file)
@@ -129,7 +129,7 @@ static int setup_hx_download(CURL *hnd, const char *url, struct transfer_d *t,
   curl_easy_setopt(hnd, CURLOPT_XFERINFOFUNCTION, my_progress_d_cb);
   curl_easy_setopt(hnd, CURLOPT_XFERINFODATA, t);
   if(use_earlydata)
-    curl_easy_setopt(hnd, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_EARLYDATA);
+    curl_easy_setopt(hnd, CURLOPT_SSL_OPTIONS, CURLSSLOPT_EARLYDATA);
   if(forbid_reuse_d)
     curl_easy_setopt(hnd, CURLOPT_FORBID_REUSE, 1L);
   if(host)
index 3cefdacfbfa5b3032eafae412b6b5eb53cf0a9eb..0fd25b0fa17e4cfe572094245f67f1afb700bd1f 100644 (file)
@@ -149,7 +149,7 @@ static int setup_hx_upload(CURL *hnd, const char *url, struct transfer_u *t,
   curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, my_write_u_cb);
   curl_easy_setopt(hnd, CURLOPT_WRITEDATA, t);
   if(use_earlydata)
-    curl_easy_setopt(hnd, CURLOPT_SSL_OPTIONS, (long)CURLSSLOPT_EARLYDATA);
+    curl_easy_setopt(hnd, CURLOPT_SSL_OPTIONS, CURLSSLOPT_EARLYDATA);
 
   if(!t->method || !strcmp("PUT", t->method))
     curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
index 9a84c8d509c976ea94cef17929f756719e8a18c3..5062cae32abe9725806cb5a3c6875e2e00c2c1ce 100644 (file)
@@ -37,7 +37,7 @@ static CURLcode test_lib1511(char *URL)
 
   easy_setopt(curl, CURLOPT_URL, URL);
   easy_setopt(curl, CURLOPT_HEADER, 1L);
-  easy_setopt(curl, CURLOPT_TIMECONDITION, (long)CURL_TIMECOND_IFMODSINCE);
+  easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
 
   /* TIMEVALUE in the future */
   easy_setopt(curl, CURLOPT_TIMEVALUE, 1566210680L);
index 545bf90abe6f3c38e17dbaf86458da8bff2bafcf..0584dd99916c73cbf236f87391b0a1f50c2f26c3 100644 (file)
@@ -57,11 +57,11 @@ static CURLcode test_lib1513(char *URL)
   easy_init(curl);
 
   easy_setopt(curl, CURLOPT_URL, URL);
-  easy_setopt(curl, CURLOPT_TIMEOUT, (long)7);
-  easy_setopt(curl, CURLOPT_NOSIGNAL, (long)1);
+  easy_setopt(curl, CURLOPT_TIMEOUT, 7L);
+  easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
   easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progressKiller);
   easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL);
-  easy_setopt(curl, CURLOPT_NOPROGRESS, (long)0);
+  easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
 
   res = curl_easy_perform(curl);
 
index 39c9ad5cb913397879ca1bc5d9d71adefc7bd898..51692fab67f31fd75bfb23c63139eecb76effd6e 100644 (file)
@@ -62,11 +62,11 @@ static CURLcode test_lib1555(char *URL)
   easy_init(t1555_curl);
 
   easy_setopt(t1555_curl, CURLOPT_URL, URL);
-  easy_setopt(t1555_curl, CURLOPT_TIMEOUT, (long)7);
-  easy_setopt(t1555_curl, CURLOPT_NOSIGNAL, (long)1);
+  easy_setopt(t1555_curl, CURLOPT_TIMEOUT, 7L);
+  easy_setopt(t1555_curl, CURLOPT_NOSIGNAL, 1L);
   easy_setopt(t1555_curl, CURLOPT_PROGRESSFUNCTION, progressCallback);
   easy_setopt(t1555_curl, CURLOPT_PROGRESSDATA, NULL);
-  easy_setopt(t1555_curl, CURLOPT_NOPROGRESS, (long)0);
+  easy_setopt(t1555_curl, CURLOPT_NOPROGRESS, 0L);
 
   res = curl_easy_perform(t1555_curl);
 
index 7a402a029324d1a0ab9fa4d83ad0b90c638b7166..eb8d31e926292232310a241ba9c01c767dbd3ad7 100644 (file)
@@ -37,7 +37,7 @@ static CURLcode test_lib1568(char *URL)
   curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
   curl_easy_setopt(hnd, CURLOPT_USERPWD, "testuser:testpass");
   curl_easy_setopt(hnd, CURLOPT_USERAGENT, "lib1568");
-  curl_easy_setopt(hnd, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
+  curl_easy_setopt(hnd, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
   curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
   curl_easy_setopt(hnd, CURLOPT_PORT, strtol(libtest_arg2, NULL, 10));
 
index 803e410b90137e2277d62f4d661226061090f725..44d8bf1e1da021c4c292790e7e502a6af929a5da 100644 (file)
@@ -40,7 +40,7 @@ static CURLcode test_lib1593(char *URL)
   easy_init(curl);
 
   easy_setopt(curl, CURLOPT_URL, URL);
-  easy_setopt(curl, CURLOPT_TIMECONDITION, (long)CURL_TIMECOND_IFMODSINCE);
+  easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
   /* Some TIMEVALUE; it doesn't matter. */
   easy_setopt(curl, CURLOPT_TIMEVALUE, 1566210680L);
 
index 24617246b286da2c0d156201939aa242981f26e9..73ca9e18f6dc963760484e370e4ef8fde26fc57d 100644 (file)
@@ -33,7 +33,7 @@ static CURLcode test_lib1599(char *URL)
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, URL);
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
-    curl_easy_setopt(curl, CURLOPT_NETRC, (long)CURL_NETRC_REQUIRED);
+    curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_REQUIRED);
     curl_easy_setopt(curl, CURLOPT_NETRC_FILE, libtest_arg2);
 
     res = curl_easy_perform(curl);
index 416b3b729ba73f04a99d9c8d4fee8da7b9de4df4..5ac7e1246df30bc9aadccb797643b6721d5fa60b 100644 (file)
@@ -73,8 +73,7 @@ static CURLcode test_lib1662(char *URL)
       curl_easy_setopt(hnd, CURLOPT_USERAGENT, "curl/2000");
       curl_easy_setopt(hnd, CURLOPT_FOLLOWLOCATION, 1L);
       curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
-      curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION,
-                       (long)CURL_HTTP_VERSION_2TLS);
+      curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
       curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
       curl_easy_setopt(hnd, CURLOPT_FTP_SKIP_PASV_IP, 1L);
       curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);
index 9145b63965749e756e08d76a456187d26ca78d78..d5df7cae07bc23f0f8c44b74065e49862914904f 100644 (file)
@@ -45,7 +45,7 @@ static CURLcode test_lib2309(char *URL)
     curl_easy_setopt(curl, CURLOPT_URL, URL);
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
     curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg3);
-    curl_easy_setopt(curl, CURLOPT_NETRC, (long)CURL_NETRC_REQUIRED);
+    curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_REQUIRED);
     curl_easy_setopt(curl, CURLOPT_NETRC_FILE, libtest_arg2);
 
     curldupe = curl_easy_duphandle(curl);
index fde428397242b794a8fdd84c5a138deb3ead51e4..af31ce39361dd4b74eaa21d794602f97ab57ca05 100644 (file)
@@ -70,7 +70,7 @@ static CURLcode test_lib2502(char *URL)
     easy_setopt(curl[i], CURLOPT_URL, target_url);
     /* go http2 */
     easy_setopt(curl[i], CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3ONLY);
-    easy_setopt(curl[i], CURLOPT_CONNECTTIMEOUT_MS, (long)5000);
+    easy_setopt(curl[i], CURLOPT_CONNECTTIMEOUT_MS, 5000L);
     easy_setopt(curl[i], CURLOPT_CAINFO, libtest_arg4);
     /* wait for first connection established to see if we can share it */
     easy_setopt(curl[i], CURLOPT_PIPEWAIT, 1L);
index bef9260c4ea6a2706a48f04359d7cdeb197b569d..c5d4a5582ed2a849c70f745c8a6312fcb63dba82 100644 (file)
@@ -110,7 +110,7 @@ static CURLcode test_lib510(char *URL)
   test_setopt(curl, CURLOPT_HTTPHEADER, slist);
 
   if(testnum == 565) {
-    test_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
+    test_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
     test_setopt(curl, CURLOPT_USERPWD, "foo:bar");
   }
 
index 1914206972f8493cc14584c4cc7803a1fb6b8d2f..b4c8a00eebcff3cbd20edb33fa239aabf85162b0 100644 (file)
@@ -61,7 +61,7 @@ static CURLcode init(int num, CURLM *cm, const char *url, const char *userpwd,
   if(res)
     goto init_failed;
 
-  res_easy_setopt(testeh[num], CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
+  res_easy_setopt(testeh[num], CURLOPT_PROXYAUTH, CURLAUTH_ANY);
   if(res)
     goto init_failed;
 
index 829f8fdd6206f64df6feb97219cc389c26787048..9099b458c9c88ca437ce2d21802cd0707cc51a7d 100644 (file)
@@ -103,7 +103,7 @@ static CURLcode test_lib547(char *URL)
   test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
   test_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3);
   test_setopt(curl, CURLOPT_PROXYAUTH,
-                   (long) (CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC) );
+              CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM);
 
   res = curl_easy_perform(curl);
 
index 3fbdac130e3eb7cc4cf471f753107176b4bbfb6b..9a97d110afb87703772ef4ff0adea2111c90c7fa 100644 (file)
@@ -198,7 +198,7 @@ static CURLcode test_lib552(char *URL)
 
   /* Accept any auth. But for this bug configure proxy with DIGEST, basic
      might work too, not NTLM */
-  test_setopt(curl, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
+  test_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
 
   res = curl_easy_perform(curl);
 
index f3e03d6dfd4459a87204ff492feafce72e2d9e5f..a71df177141f81402ddcffcdd85ed5c24037ad66 100644 (file)
@@ -99,7 +99,7 @@ static CURLcode test_lib555(char *URL)
   easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
   easy_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3);
   easy_setopt(curl, CURLOPT_PROXYAUTH,
-                   (long) (CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC) );
+              CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM);
 
   multi_init(m);
 
index fd47d55be9b4d213cef3b1743f107e04083ada37..8ec94c3f6627bfc8f2a3aa5b4be491beccbc30ce 100644 (file)
@@ -149,7 +149,7 @@ static CURLcode test_lib579(char *URL)
   /* enforce chunked transfer by setting the header */
   test_setopt(curl, CURLOPT_HTTPHEADER, slist);
 
-  test_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
+  test_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
   test_setopt(curl, CURLOPT_USERPWD, "foo:bar");
 
   /* we want to use our own progress function */
index a68105ea473eb0fd2414eb7bbe79c589cdd3a92c..07e0e4ac451ba477ffacb92806f661753f276611 100644 (file)
@@ -54,7 +54,7 @@ static CURLcode test_lib583(char *URL)
   easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   easy_setopt(curl, CURLOPT_URL, URL);
-  easy_setopt(curl, CURLOPT_INFILESIZE, (long)5);
+  easy_setopt(curl, CURLOPT_INFILESIZE, 5L);
 
   multi_add_handle(multiHandle, curl);
 
index ffa30c6fce519c4aa2875b1027083522b2ac4abb..d11f7fc09c5aed82d9024090e7b52502cfaa8ced 100644 (file)
 
   It is reproducible by the following steps:
 
-  - Use a proxy that offers NTLM and Negotiate ( CURLOPT_PROXY and
-  CURLOPT_PROXYPORT)
-  - Tell libcurl NOT to use Negotiate  CURL_EASY_SETOPT(CURLOPT_PROXYAUTH,
-  CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM)
+  - Use a proxy that offers NTLM and Negotiate
+    (CURLOPT_PROXY and CURLOPT_PROXYPORT)
+  - Tell libcurl NOT to use Negotiate
+    curl_easy_setopt(CURLOPT_PROXYAUTH,
+                     CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM)
   - Start the request
 */
 
@@ -59,7 +60,7 @@ static CURLcode test_lib590(char *URL)
   test_setopt(curl, CURLOPT_URL, URL);
   test_setopt(curl, CURLOPT_HEADER, 1L);
   test_setopt(curl, CURLOPT_PROXYAUTH,
-              (long) (CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM));
+              CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM);
   test_setopt(curl, CURLOPT_PROXY, libtest_arg2); /* set in first.c */
 
   /* set the name + password twice to test that the API is fine with it */
index 2461769f8f1ca1c826fbcd0af33179638ad859c9..cad7b9843eea3f910d9ad5a996c3226688452e65 100644 (file)
@@ -80,8 +80,7 @@ static CURLcode test_cert_blob(const char *url, const char *cafile)
     curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
     curl_easy_setopt(curl, CURLOPT_URL, url);
     curl_easy_setopt(curl, CURLOPT_USERAGENT, "CURLOPT_CAINFO_BLOB");
-    curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS,
-                     (long)CURLSSLOPT_REVOKE_BEST_EFFORT);
+    curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_REVOKE_BEST_EFFORT);
 
     blob.data = certdata;
     blob.len = certsize;
index 071697838cd67d0cb9f413e3a1a7632c0633d51d..e637946c96834f015c6033c4897f58afd1552a6e 100644 (file)
@@ -48,7 +48,7 @@ static CURLcode test_lib694(char *URL)
   test_setopt(curl, CURLOPT_HEADER, 1L);
   test_setopt(curl, CURLOPT_VERBOSE, 1L);
   test_setopt(curl, CURLOPT_HTTPAUTH,
-              (long) (CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM));
+              CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM);
   test_setopt(curl, CURLOPT_USERPWD, "me:password");
 
   do {