]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
examples: remove superfluous asterisk uses
authorDaniel Stenberg <daniel@haxx.se>
Wed, 16 Dec 2020 08:24:16 +0000 (09:24 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 16 Dec 2020 08:24:16 +0000 (09:24 +0100)
... for function pointers. Breaks in ancient compilers.

docs/examples/cacertinmem.c
docs/examples/synctime.c
docs/examples/usercertinmem.c

index dd9bb067769635dfeb626c275bee730d0a4266ed..880b7b1fdb2e4bfe19d1dfab8418efdf84626f29 100644 (file)
@@ -129,9 +129,9 @@ int main(void)
   curl_easy_setopt(ch, CURLOPT_HEADER, 0L);
   curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L);
   curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L);
-  curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, *writefunction);
+  curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, writefunction);
   curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout);
-  curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, *writefunction);
+  curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, writefunction);
   curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr);
   curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM");
   curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L);
@@ -168,7 +168,7 @@ int main(void)
    * load the certificate by installing a function doing the necessary
    * "modifications" to the SSL CONTEXT just before link init
    */
-  curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
+  curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
   rv = curl_easy_perform(ch);
   if(rv == CURLE_OK)
     printf("*** transfer succeeded ***\n");
index 180ab1a7caf043eb2df9b75881868f699e4ea7b1..b6b77268ea3ec49bc5be41967039f831454128f1 100644 (file)
@@ -198,8 +198,8 @@ void SyncTime_CURL_Init(CURL *curl, char *proxy_port,
 #ifdef SYNCTIME_UA
   curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA);
 #endif
-  curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, *SyncTime_CURL_WriteOutput);
-  curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, *SyncTime_CURL_WriteHeader);
+  curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, SyncTime_CURL_WriteOutput);
+  curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, SyncTime_CURL_WriteHeader);
 }
 
 int SyncTime_CURL_Fetch(CURL *curl, char *URL_Str, char *OutFileName,
index dcfecd3ada36d58036766b8a0a38e3059522c940..35218bdc29e918ab7668caec6d7abea1dbdec4cf 100644 (file)
@@ -211,7 +211,7 @@ int main(void)
    * load the certificate and key by installing a function doing the necessary
    * "modifications" to the SSL CONTEXT just before link init
    */
-  curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
+  curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
   rv = curl_easy_perform(ch);
   if(rv == CURLE_OK) {
     printf("*** transfer succeeded ***\n");