]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs: rename CURLcode variables to 'result'
authorDaniel Stenberg <daniel@haxx.se>
Tue, 16 Dec 2025 14:54:06 +0000 (15:54 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 17 Dec 2025 07:55:12 +0000 (08:55 +0100)
381 files changed:
docs/examples/10-at-a-time.c
docs/examples/address-scope.c
docs/examples/altsvc.c
docs/examples/anyauthput.c
docs/examples/block_ip.c
docs/examples/cacertinmem.c
docs/examples/certinfo.c
docs/examples/chkspeed.c
docs/examples/connect-to.c
docs/examples/cookie_interface.c
docs/examples/crawler.c
docs/examples/debug.c
docs/examples/default-scheme.c
docs/examples/ephiperfifo.c
docs/examples/evhiperfifo.c
docs/examples/externalsocket.c
docs/examples/fileupload.c
docs/examples/ftp-delete.c
docs/examples/ftp-wildcard.c
docs/examples/ftpget.c
docs/examples/ftpgetinfo.c
docs/examples/ftpgetresp.c
docs/examples/ftpsget.c
docs/examples/ftpupload.c
docs/examples/ftpuploadfrommem.c
docs/examples/ftpuploadresume.c
docs/examples/getinfo.c
docs/examples/getinmemory.c
docs/examples/getredirect.c
docs/examples/getreferrer.c
docs/examples/ghiper.c
docs/examples/headerapi.c
docs/examples/hiperfifo.c
docs/examples/hsts-preload.c
docs/examples/htmltidy.c
docs/examples/htmltitle.cpp
docs/examples/http-options.c
docs/examples/http-post.c
docs/examples/http2-download.c
docs/examples/http2-pushinmemory.c
docs/examples/http2-serverpush.c
docs/examples/http2-upload.c
docs/examples/http3-present.c
docs/examples/http3.c
docs/examples/httpcustomheader.c
docs/examples/httpput-postfields.c
docs/examples/httpput.c
docs/examples/https.c
docs/examples/imap-append.c
docs/examples/imap-authzid.c
docs/examples/imap-copy.c
docs/examples/imap-create.c
docs/examples/imap-delete.c
docs/examples/imap-examine.c
docs/examples/imap-fetch.c
docs/examples/imap-list.c
docs/examples/imap-lsub.c
docs/examples/imap-multi.c
docs/examples/imap-noop.c
docs/examples/imap-search.c
docs/examples/imap-ssl.c
docs/examples/imap-store.c
docs/examples/imap-tls.c
docs/examples/interface.c
docs/examples/ipv6.c
docs/examples/keepalive.c
docs/examples/localport.c
docs/examples/log_failed_transfers.c
docs/examples/maxconnects.c
docs/examples/multi-app.c
docs/examples/multi-debugcallback.c
docs/examples/multi-double.c
docs/examples/multi-event.c
docs/examples/multi-formadd.c
docs/examples/multi-legacy.c
docs/examples/multi-post.c
docs/examples/multi-single.c
docs/examples/multi-uv.c
docs/examples/netrc.c
docs/examples/persistent.c
docs/examples/pop3-authzid.c
docs/examples/pop3-dele.c
docs/examples/pop3-list.c
docs/examples/pop3-multi.c
docs/examples/pop3-noop.c
docs/examples/pop3-retr.c
docs/examples/pop3-ssl.c
docs/examples/pop3-stat.c
docs/examples/pop3-tls.c
docs/examples/pop3-top.c
docs/examples/pop3-uidl.c
docs/examples/post-callback.c
docs/examples/postinmemory.c
docs/examples/postit2-formadd.c
docs/examples/postit2.c
docs/examples/progressfunc.c
docs/examples/protofeats.c
docs/examples/range.c
docs/examples/resolve.c
docs/examples/rtsp-options.c
docs/examples/sendrecv.c
docs/examples/sepheaders.c
docs/examples/sessioninfo.c
docs/examples/sftpget.c
docs/examples/sftpuploadresume.c
docs/examples/shared-connection-cache.c
docs/examples/simple.c
docs/examples/simplepost.c
docs/examples/simplessl.c
docs/examples/smooth-gtk-thread.c
docs/examples/smtp-authzid.c
docs/examples/smtp-expn.c
docs/examples/smtp-mail.c
docs/examples/smtp-mime.c
docs/examples/smtp-multi.c
docs/examples/smtp-ssl.c
docs/examples/smtp-tls.c
docs/examples/smtp-vrfy.c
docs/examples/synctime.c
docs/examples/threaded.c
docs/examples/unixsocket.c
docs/examples/url2file.c
docs/examples/urlapi.c
docs/examples/usercertinmem.c
docs/examples/websocket-cb.c
docs/examples/websocket-updown.c
docs/examples/websocket.c
docs/examples/xmlstream.c
docs/libcurl/curl_easy_cleanup.md
docs/libcurl/curl_easy_duphandle.md
docs/libcurl/curl_easy_getinfo.md
docs/libcurl/curl_easy_init.md
docs/libcurl/curl_easy_perform.md
docs/libcurl/curl_easy_recv.md
docs/libcurl/curl_easy_send.md
docs/libcurl/curl_easy_setopt.md
docs/libcurl/curl_easy_ssls_export.md
docs/libcurl/curl_easy_ssls_import.md
docs/libcurl/curl_easy_strerror.md
docs/libcurl/curl_ws_recv.md
docs/libcurl/curl_ws_send.md
docs/libcurl/curl_ws_start_frame.md
docs/libcurl/opts/CURLINFO_ACTIVESOCKET.md
docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.md
docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.md
docs/libcurl/opts/CURLINFO_CERTINFO.md
docs/libcurl/opts/CURLINFO_CONDITION_UNMET.md
docs/libcurl/opts/CURLINFO_CONNECT_TIME.md
docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.md
docs/libcurl/opts/CURLINFO_CONN_ID.md
docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.md
docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.md
docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.md
docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.md
docs/libcurl/opts/CURLINFO_CONTENT_TYPE.md
docs/libcurl/opts/CURLINFO_COOKIELIST.md
docs/libcurl/opts/CURLINFO_EARLYDATA_SENT_T.md
docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.md
docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.md
docs/libcurl/opts/CURLINFO_FILETIME.md
docs/libcurl/opts/CURLINFO_FILETIME_T.md
docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.md
docs/libcurl/opts/CURLINFO_HEADER_SIZE.md
docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.md
docs/libcurl/opts/CURLINFO_HTTPAUTH_USED.md
docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.md
docs/libcurl/opts/CURLINFO_HTTP_VERSION.md
docs/libcurl/opts/CURLINFO_LASTSOCKET.md
docs/libcurl/opts/CURLINFO_LOCAL_IP.md
docs/libcurl/opts/CURLINFO_LOCAL_PORT.md
docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.md
docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.md
docs/libcurl/opts/CURLINFO_NUM_CONNECTS.md
docs/libcurl/opts/CURLINFO_OS_ERRNO.md
docs/libcurl/opts/CURLINFO_POSTTRANSFER_TIME_T.md
docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.md
docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.md
docs/libcurl/opts/CURLINFO_PRIMARY_IP.md
docs/libcurl/opts/CURLINFO_PRIMARY_PORT.md
docs/libcurl/opts/CURLINFO_PRIVATE.md
docs/libcurl/opts/CURLINFO_PROTOCOL.md
docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.md
docs/libcurl/opts/CURLINFO_PROXYAUTH_USED.md
docs/libcurl/opts/CURLINFO_PROXY_ERROR.md
docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.md
docs/libcurl/opts/CURLINFO_QUEUE_TIME_T.md
docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.md
docs/libcurl/opts/CURLINFO_REDIRECT_TIME.md
docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.md
docs/libcurl/opts/CURLINFO_REDIRECT_URL.md
docs/libcurl/opts/CURLINFO_REFERER.md
docs/libcurl/opts/CURLINFO_REQUEST_SIZE.md
docs/libcurl/opts/CURLINFO_RESPONSE_CODE.md
docs/libcurl/opts/CURLINFO_RETRY_AFTER.md
docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.md
docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.md
docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.md
docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.md
docs/libcurl/opts/CURLINFO_SCHEME.md
docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.md
docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.md
docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.md
docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.md
docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.md
docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.md
docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.md
docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.md
docs/libcurl/opts/CURLINFO_SSL_ENGINES.md
docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.md
docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.md
docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.md
docs/libcurl/opts/CURLINFO_TLS_SESSION.md
docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.md
docs/libcurl/opts/CURLINFO_TOTAL_TIME.md
docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.md
docs/libcurl/opts/CURLINFO_USED_PROXY.md
docs/libcurl/opts/CURLINFO_XFER_ID.md
docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.md
docs/libcurl/opts/CURLOPT_AUTOREFERER.md
docs/libcurl/opts/CURLOPT_BUFFERSIZE.md
docs/libcurl/opts/CURLOPT_CAINFO_BLOB.md
docs/libcurl/opts/CURLOPT_CAPATH.md
docs/libcurl/opts/CURLOPT_CERTINFO.md
docs/libcurl/opts/CURLOPT_CONNECT_ONLY.md
docs/libcurl/opts/CURLOPT_COOKIEFILE.md
docs/libcurl/opts/CURLOPT_COOKIEJAR.md
docs/libcurl/opts/CURLOPT_COOKIESESSION.md
docs/libcurl/opts/CURLOPT_CRLF.md
docs/libcurl/opts/CURLOPT_CRLFILE.md
docs/libcurl/opts/CURLOPT_CURLU.md
docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.md
docs/libcurl/opts/CURLOPT_DEBUGDATA.md
docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md
docs/libcurl/opts/CURLOPT_DIRLISTONLY.md
docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.md
docs/libcurl/opts/CURLOPT_DNS_INTERFACE.md
docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.md
docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.md
docs/libcurl/opts/CURLOPT_DNS_SERVERS.md
docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.md
docs/libcurl/opts/CURLOPT_ERRORBUFFER.md
docs/libcurl/opts/CURLOPT_FAILONERROR.md
docs/libcurl/opts/CURLOPT_FILETIME.md
docs/libcurl/opts/CURLOPT_FTPPORT.md
docs/libcurl/opts/CURLOPT_FTPSSLAUTH.md
docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.md
docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.md
docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.md
docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.md
docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.md
docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.md
docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.md
docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.md
docs/libcurl/opts/CURLOPT_FTP_USE_PRET.md
docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.md
docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.md
docs/libcurl/opts/CURLOPT_HAPROXY_CLIENT_IP.md
docs/libcurl/opts/CURLOPT_HEADEROPT.md
docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.md
docs/libcurl/opts/CURLOPT_HSTSWRITEFUNCTION.md
docs/libcurl/opts/CURLOPT_HTTP09_ALLOWED.md
docs/libcurl/opts/CURLOPT_HTTPAUTH.md
docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.md
docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.md
docs/libcurl/opts/CURLOPT_HTTP_VERSION.md
docs/libcurl/opts/CURLOPT_INTERFACE.md
docs/libcurl/opts/CURLOPT_IPRESOLVE.md
docs/libcurl/opts/CURLOPT_ISSUERCERT.md
docs/libcurl/opts/CURLOPT_ISSUERCERT_BLOB.md
docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.md
docs/libcurl/opts/CURLOPT_KEYPASSWD.md
docs/libcurl/opts/CURLOPT_KRBLEVEL.md
docs/libcurl/opts/CURLOPT_LOCALPORT.md
docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.md
docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.md
docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.md
docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.md
docs/libcurl/opts/CURLOPT_MAIL_AUTH.md
docs/libcurl/opts/CURLOPT_MAIL_FROM.md
docs/libcurl/opts/CURLOPT_MAIL_RCPT.md
docs/libcurl/opts/CURLOPT_MAIL_RCPT_ALLOWFAILS.md
docs/libcurl/opts/CURLOPT_MAXCONNECTS.md
docs/libcurl/opts/CURLOPT_MAXFILESIZE.md
docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.md
docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.md
docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.md
docs/libcurl/opts/CURLOPT_NETRC.md
docs/libcurl/opts/CURLOPT_NETRC_FILE.md
docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.md
docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.md
docs/libcurl/opts/CURLOPT_NOSIGNAL.md
docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.md
docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md
docs/libcurl/opts/CURLOPT_PASSWORD.md
docs/libcurl/opts/CURLOPT_PORT.md
docs/libcurl/opts/CURLOPT_POST.md
docs/libcurl/opts/CURLOPT_POSTQUOTE.md
docs/libcurl/opts/CURLOPT_PREQUOTE.md
docs/libcurl/opts/CURLOPT_PROXYAUTH.md
docs/libcurl/opts/CURLOPT_PROXYPASSWORD.md
docs/libcurl/opts/CURLOPT_PROXYPORT.md
docs/libcurl/opts/CURLOPT_PROXYTYPE.md
docs/libcurl/opts/CURLOPT_PROXYUSERNAME.md
docs/libcurl/opts/CURLOPT_PROXYUSERPWD.md
docs/libcurl/opts/CURLOPT_PROXY_CAINFO.md
docs/libcurl/opts/CURLOPT_PROXY_CAINFO_BLOB.md
docs/libcurl/opts/CURLOPT_PROXY_CAPATH.md
docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.md
docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT.md
docs/libcurl/opts/CURLOPT_PROXY_ISSUERCERT_BLOB.md
docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.md
docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.md
docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.md
docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.md
docs/libcurl/opts/CURLOPT_PROXY_SSLCERT_BLOB.md
docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.md
docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.md
docs/libcurl/opts/CURLOPT_PROXY_SSLKEY_BLOB.md
docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.md
docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.md
docs/libcurl/opts/CURLOPT_PROXY_TLS13_CIPHERS.md
docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.md
docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.md
docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.md
docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.md
docs/libcurl/opts/CURLOPT_QUICK_EXIT.md
docs/libcurl/opts/CURLOPT_QUOTE.md
docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.md
docs/libcurl/opts/CURLOPT_RTSP_REQUEST.md
docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.md
docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.md
docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.md
docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.md
docs/libcurl/opts/CURLOPT_SASL_AUTHZID.md
docs/libcurl/opts/CURLOPT_SASL_IR.md
docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT.md
docs/libcurl/opts/CURLOPT_SERVER_RESPONSE_TIMEOUT_MS.md
docs/libcurl/opts/CURLOPT_SERVICE_NAME.md
docs/libcurl/opts/CURLOPT_SHARE.md
docs/libcurl/opts/CURLOPT_SOCKOPTDATA.md
docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.md
docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.md
docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.md
docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.md
docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.md
docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.md
docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.md
docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.md
docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.md
docs/libcurl/opts/CURLOPT_SSLCERT.md
docs/libcurl/opts/CURLOPT_SSLCERTTYPE.md
docs/libcurl/opts/CURLOPT_SSLCERT_BLOB.md
docs/libcurl/opts/CURLOPT_SSLENGINE.md
docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.md
docs/libcurl/opts/CURLOPT_SSLKEY.md
docs/libcurl/opts/CURLOPT_SSLKEYTYPE.md
docs/libcurl/opts/CURLOPT_SSLKEY_BLOB.md
docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.md
docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md
docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md
docs/libcurl/opts/CURLOPT_SSL_EC_CURVES.md
docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.md
docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.md
docs/libcurl/opts/CURLOPT_SSL_OPTIONS.md
docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.md
docs/libcurl/opts/CURLOPT_SSL_SIGNATURE_ALGORITHMS.md
docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.md
docs/libcurl/opts/CURLOPT_TELNETOPTIONS.md
docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.md
docs/libcurl/opts/CURLOPT_TLS13_CIPHERS.md
docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.md
docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.md
docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.md
docs/libcurl/opts/CURLOPT_TRAILERFUNCTION.md
docs/libcurl/opts/CURLOPT_TRANSFERTEXT.md
docs/libcurl/opts/CURLOPT_UPLOAD_BUFFERSIZE.md
docs/libcurl/opts/CURLOPT_USERNAME.md
docs/libcurl/opts/CURLOPT_USERPWD.md
docs/libcurl/opts/CURLOPT_WRITEFUNCTION.md
docs/libcurl/opts/CURLOPT_WS_OPTIONS.md
docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.md

index 1d680dc0b0543029e92682a5f2be9bc53a4a038e..e5cd1f1ad91e44484125cbb903d5f7b2886f4d35 100644 (file)
@@ -106,9 +106,9 @@ int main(void)
 {
   CURLM *multi;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   multi = curl_multi_init();
   if(multi) {
index adfcf2789bf650bb5b1bde01006f532e48e24d44..dba6c8f77333d12c4f731614719e91cb535d4531 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
   /* Windows/MS-DOS users need to find how to use if_nametoindex() */
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -51,18 +51,18 @@ int main(void)
     my_scope_id = (long)if_nametoindex("eth0");
     curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, my_scope_id);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 #else
   return 0;
 #endif
index 99b92c0157c9595db1d90ef8b33bf86b95eac123..bb813aa3f7afc159c38c6d071ca26df2384743ba 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -48,16 +48,16 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL,
                      CURLALTSVC_H1 | CURLALTSVC_H2 | CURLALTSVC_H3);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index a8f179e8e75d3dcc08b761eed39e887ac2b85e6d..cdc0ad9e5f870e73d8fa8574f34eb739eaf66821 100644 (file)
@@ -91,7 +91,7 @@ static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
 int main(int argc, char **argv)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   FILE *fp;
   struct stat file_info;
 
@@ -115,10 +115,10 @@ int main(int argc, char **argv)
   }
 
   /* In Windows, this inits the Winsock stuff */
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res) {
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result) {
     fclose(fp);
-    return (int)res;
+    return (int)result;
   }
 
   /* get a curl handle */
@@ -157,11 +157,11 @@ int main(int argc, char **argv)
     curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
 
     /* Now run off and do what you have been told! */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -169,5 +169,5 @@ int main(int argc, char **argv)
   fclose(fp); /* close the local file */
 
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 04223ddd0363678c4efd7c512887fb4ad2f59d93..3515acfad7b636884ec7e21d02917e8337a3684e 100644 (file)
@@ -293,17 +293,17 @@ static curl_socket_t opensocket(void *clientp,
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   struct connection_filter *filter;
 
   filter = (struct connection_filter *)calloc(1, sizeof(*filter));
   if(!filter)
     return 1;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res) {
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result) {
     free(filter);
-    return (int)res;
+    return (int)result;
   }
 
   curl = curl_easy_init();
@@ -336,12 +336,12 @@ int main(void)
   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* Perform the request */
-  res = curl_easy_perform(curl);
+  result = curl_easy_perform(curl);
 
   /* Check for errors */
-  if(res != CURLE_OK) {
+  if(result != CURLE_OK) {
     fprintf(stderr, "curl_easy_perform() failed: %s\n",
-            curl_easy_strerror(res));
+            curl_easy_strerror(result));
   }
 
   /* Clean up */
index b37cd6f41485cc2b82d4ad94eac5d0a83a6e75c4..786ae00d5a192599d94daab6eeaa8946c25cc492 100644 (file)
@@ -119,9 +119,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -147,8 +147,8 @@ int main(void)
     /* first try: retrieve page without ca certificates -> should fail
      * unless libcurl was built --with-ca-fallback enabled at build-time
      */
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK)
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK)
       printf("*** transfer succeeded ***\n");
     else
       printf("*** transfer failed ***\n");
@@ -168,8 +168,8 @@ int main(void)
      * "modifications" to the SSL CONTEXT just before link init
      */
     curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK)
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK)
       printf("*** transfer succeeded ***\n");
     else
       printf("*** transfer failed ***\n");
@@ -177,5 +177,5 @@ int main(void)
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index e799cfc92879821873953414d2874343c9ce89ad..7dfa8e99c983110873686a7fa8656ccb1d00ab91 100644 (file)
@@ -39,11 +39,11 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *stream)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -57,14 +57,14 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
     curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       struct curl_certinfo *certinfo;
 
-      res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo);
+      result = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo);
 
-      if(!res && certinfo) {
+      if(!result && certinfo) {
         int i;
 
         printf("%d certs!\n", certinfo->num_of_certs);
@@ -83,5 +83,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 962180a56031793d5700d4ab22965ef6509557d5..3e8181e16fdd04f9fc9bc678ced7b1b0c2e43259 100644 (file)
@@ -69,7 +69,7 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
 int main(int argc, char *argv[])
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   int prtall = 0, prtsep = 0, prttime = 0;
   const char *url = URL_1M;
   char *appname = argv[0];
@@ -161,9 +161,9 @@ int main(int argc, char *argv[])
   }
 
   /* init libcurl */
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* init the curl session */
   curl = curl_easy_init();
@@ -181,43 +181,43 @@ int main(int argc, char *argv[])
                      "libcurl-speedchecker/" CHKSPEED_VERSION);
 
     /* get it! */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(CURLE_OK == res) {
+    if(CURLE_OK == result) {
       curl_off_t val;
 
       /* check for bytes downloaded */
-      res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &val);
-      if((CURLE_OK == res) && (val > 0))
+      result = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &val);
+      if((CURLE_OK == result) && (val > 0))
         printf("Data downloaded: %" CURL_FORMAT_CURL_OFF_T " bytes.\n", val);
 
       /* check for total download time */
-      res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &val);
-      if((CURLE_OK == res) && (val > 0))
+      result = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &val);
+      if((CURLE_OK == result) && (val > 0))
         printf("Total download time: %" CURL_FORMAT_CURL_OFF_T
                ".%06" CURL_FORMAT_CURL_OFF_T " sec.\n",
                val / 1000000,
                val % 1000000);
 
       /* check for average download speed */
-      res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &val);
-      if((CURLE_OK == res) && (val > 0))
+      result = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &val);
+      if((CURLE_OK == result) && (val > 0))
         printf("Average download speed: "
                "%" CURL_FORMAT_CURL_OFF_T " kbyte/sec.\n",
                val / 1024);
 
       if(prtall) {
         /* check for name resolution time */
-        res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T, &val);
-        if((CURLE_OK == res) && (val > 0))
+        result = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T, &val);
+        if((CURLE_OK == result) && (val > 0))
           printf("Name lookup time: %" CURL_FORMAT_CURL_OFF_T
                  ".%06" CURL_FORMAT_CURL_OFF_T " sec.\n",
                  val / 1000000,
                  val % 1000000);
 
         /* check for connect time */
-        res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &val);
-        if((CURLE_OK == res) && (val > 0))
+        result = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &val);
+        if((CURLE_OK == result) && (val > 0))
           printf("Connect time: %" CURL_FORMAT_CURL_OFF_T
                  ".%06" CURL_FORMAT_CURL_OFF_T " sec.\n",
                  val / 1000000,
@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
     }
     else {
       fprintf(stderr, "Error while fetching '%s' : %s\n",
-              url, curl_easy_strerror(res));
+              url, curl_easy_strerror(result));
     }
 
     /* cleanup curl stuff */
index 3353c6a6c20348704abe7d2e4008e25c6c748bd1..d401fca662533756dcc5783df53dd98f7160a2dc 100644 (file)
@@ -34,9 +34,9 @@ int main(void)
   struct curl_slist *host;
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /*
     Each single string should be written using the format
@@ -62,7 +62,7 @@ int main(void)
     /* Letting the wrong hostname in the certificate be okay, the transfer
        goes through but (most likely) causes a 404 or similar because it sends
        an unknown name in the Host: header field */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 0398cdf164ff819506fe589008b652a768ba22e2..e894f19665d03b1289b5d9ca1c7df09afb90e478 100644 (file)
 
 static int print_cookies(CURL *curl)
 {
-  CURLcode res;
+  CURLcode result;
   struct curl_slist *cookies;
   struct curl_slist *nc;
   int i;
 
   printf("Cookies, curl knows:\n");
-  res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
-  if(res != CURLE_OK) {
+  result = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
+  if(result != CURLE_OK) {
     fprintf(stderr, "curl curl_easy_getinfo failed: %s\n",
-            curl_easy_strerror(res));
+            curl_easy_strerror(result));
     return 1;
   }
   nc = cookies;
@@ -74,11 +74,11 @@ static int print_cookies(CURL *curl)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -87,9 +87,9 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
     curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* start cookie engine */
-    res = curl_easy_perform(curl);
-    if(res != CURLE_OK) {
-      fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(res));
+    result = curl_easy_perform(curl);
+    if(result != CURLE_OK) {
+      fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(result));
       return 1;
     }
 
@@ -107,10 +107,10 @@ int main(void)
              ".example.com", "TRUE", "/", "FALSE",
              difftime(time(NULL) + 31337, (time_t)0),
              "PREF", "hello example, I like you!");
-    res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
-    if(res != CURLE_OK) {
+    result = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
+    if(result != CURLE_OK) {
       fprintf(stderr, "curl curl_easy_setopt failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
       return 1;
     }
 
@@ -122,18 +122,18 @@ int main(void)
     snprintf(nline, sizeof(nline),
       "Set-Cookie: OLD_PREF=3d141414bf4209321; "
       "expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.example.com");
-    res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
-    if(res != CURLE_OK) {
+    result = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
+    if(result != CURLE_OK) {
       fprintf(stderr, "curl curl_easy_setopt failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
       return 1;
     }
 
     print_cookies(curl);
 
-    res = curl_easy_perform(curl);
-    if(res != CURLE_OK) {
-      fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(res));
+    result = curl_easy_perform(curl);
+    if(result != CURLE_OK) {
+      fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(result));
       return 1;
     }
 
index d153cc21c5ac52edeaa071b6d22b4156e2db8ece..2b199be1164d80a42f0af9d0bec8ba0575767b7b 100644 (file)
@@ -183,11 +183,11 @@ int main(void)
   int pending;
   int complete;
   int still_running;
-  CURLcode res;
+  CURLcode result;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   signal(SIGINT, sighandler);
   LIBXML_TEST_VERSION
index ff59d9c8ab6e1427e7f1c5f49b1dad33ce7508e2..e49910a5fc0b1764e6ae51978eab7f4f5ebd4ce3 100644 (file)
@@ -122,12 +122,12 @@ static int my_trace(CURL *curl, curl_infotype type,
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   struct data config;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   config.trace_ascii = 1; /* enable ASCII tracing */
 
@@ -143,15 +143,15 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index db506361075365eb5ac2d3417ad310972f5a1a82..821cad78c2d13efa6114973b3961b5bb7a30ef79 100644 (file)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -48,16 +48,16 @@ int main(void)
 
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 2c06d225bb56d90ef5f6acb10400af23f17aebea..a2cd0f2e7ee3e3a3b1f04fa210d756fff7091435 100644 (file)
@@ -186,10 +186,10 @@ static void check_multi_info(struct GlobalInfo *g)
   while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
     if(msg->msg == CURLMSG_DONE) {
       CURL *curl = msg->easy_handle;
-      CURLcode res = msg->data.result;
+      CURLcode result = msg->data.result;
       curl_easy_getinfo(curl, CURLINFO_PRIVATE, &conn);
       curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &eff_url);
-      fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+      fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, result, conn->error);
       curl_multi_remove_handle(g->multi, curl);
       free(conn->url);
       curl_easy_cleanup(curl);
@@ -453,7 +453,7 @@ void sigint_handler(int signo)
 
 int main(int argc, char **argv)
 {
-  CURLcode res;
+  CURLcode result;
   struct GlobalInfo g;
   struct itimerspec its;
   struct epoll_event ev;
@@ -461,9 +461,9 @@ int main(int argc, char **argv)
   (void)argc;
   (void)argv;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   g_should_exit_ = 0;
   signal(SIGINT, sigint_handler);
index eb79a2909092d92bf74b6cfa115c8e56f876b9c2..776ab06a8832d61353db89237f248847ae8d3e17 100644 (file)
@@ -173,10 +173,10 @@ static void check_multi_info(struct GlobalInfo *g)
   while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
     if(msg->msg == CURLMSG_DONE) {
       CURL *curl = msg->easy_handle;
-      CURLcode res = msg->data.result;
+      CURLcode result = msg->data.result;
       curl_easy_getinfo(curl, CURLINFO_PRIVATE, &conn);
       curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &eff_url);
-      fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+      fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, result, conn->error);
       curl_multi_remove_handle(g->multi, curl);
       free(conn->url);
       curl_easy_cleanup(curl);
@@ -197,7 +197,8 @@ static void event_cb(EV_P_ struct ev_io *w, int revents)
 
   action = ((revents & EV_READ) ? CURL_POLL_IN : 0) |
            ((revents & EV_WRITE) ? CURL_POLL_OUT : 0);
-  mresult = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running);
+  mresult = curl_multi_socket_action(g->multi, w->fd, action,
+                                     &g->still_running);
   mcode_or_die("event_cb: curl_multi_socket_action", mresult);
   check_multi_info(g);
   if(g->still_running <= 0) {
@@ -411,14 +412,14 @@ static int init_fifo(struct GlobalInfo *g)
 
 int main(int argc, char **argv)
 {
-  CURLcode res;
+  CURLcode result;
   struct GlobalInfo g;
   (void)argc;
   (void)argv;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   memset(&g, 0, sizeof(g));
   g.loop = ev_default_loop(0);
index 4f1b2e9091e375efa83ab648b97e6615d0f0d18e..d1bdd732b973751331ad487428e74df9ebaaaefa 100644 (file)
@@ -99,13 +99,13 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd,
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   struct sockaddr_in servaddr;  /*  socket address structure  */
   curl_socket_t sockfd;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -157,14 +157,14 @@ int main(void)
 
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
 
     close(sockfd);
 
-    if(res) {
-      printf("libcurl error: %d\n", res);
+    if(result) {
+      printf("libcurl error: %d\n", result);
       return 4;
     }
   }
index 4639b6b12f3e49f6115263a2841e0b7d3fdccd2c..82ebd878c753750923716da7f540438b161f6cef 100644 (file)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   struct stat file_info;
   curl_off_t speed_upload, total_time;
   FILE *fd;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   fd = fopen("debugit", "rb"); /* open file to upload */
   if(!fd) {
@@ -89,11 +89,11 @@ int main(void)
     /* enable verbose for easier tracing */
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK) {
+    if(result != CURLE_OK) {
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
     }
     else {
       /* now extract transfer info */
index 795dae851ef8c4463d85f3ca2b17a0913f084509..6f670533c5912da64a55ae176376319dbb9ea79b 100644 (file)
@@ -39,12 +39,12 @@ static size_t write_cb(void *buffer, size_t size, size_t nmemb, void *stream)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   struct curl_slist *headerlist = NULL;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -64,7 +64,7 @@ int main(void)
     /* pass in list of FTP commands to run after the transfer */
     curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -72,13 +72,13 @@ int main(void)
     /* clean up the FTP commands list */
     curl_slist_free_all(headerlist);
 
-    if(CURLE_OK != res) {
+    if(CURLE_OK != result) {
       /* we failed */
-      fprintf(stderr, "curl told us %d\n", res);
+      fprintf(stderr, "curl told us %d\n", result);
     }
   }
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 9159d3857f54e5a1b599e7ac79da8bd3bbe5a751..cba40d6eb8ac795997a1f932148ca311369675d1 100644 (file)
@@ -106,9 +106,9 @@ int main(int argc, char **argv)
   struct callback_data data = { 0 };
 
   /* global initialization */
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* initialization of easy handle */
   curl = curl_easy_init();
@@ -142,9 +142,9 @@ int main(int argc, char **argv)
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/test/*");
 
   /* and start transfer! */
-  res = curl_easy_perform(curl);
+  result = curl_easy_perform(curl);
 
   curl_easy_cleanup(curl);
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 4001022074749d40cdd3f2cc6be1f0bd3d624e9e..e48edc9d575835744b065bf6a5c6fdfab47e886e 100644 (file)
@@ -55,15 +55,15 @@ static size_t write_cb(void *buffer, size_t size, size_t nmemb, void *stream)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   struct FtpFile ftpfile = {
     "curl.tar.gz", /* name to store the file as if successful */
     NULL
   };
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -80,14 +80,14 @@ int main(void)
     /* Switch on full protocol/debug output */
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
 
-    if(CURLE_OK != res) {
+    if(CURLE_OK != result) {
       /* we failed */
-      fprintf(stderr, "curl told us %d\n", res);
+      fprintf(stderr, "curl told us %d\n", result);
     }
   }
 
@@ -96,5 +96,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 105bc608552f632fce5ca8d5bf2b6a32f15a342d..7d3181b9f3239eee1d60a3995d2926d73b87a1d9 100644 (file)
@@ -49,14 +49,14 @@ int main(void)
 {
   char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   long filetime = -1;
   curl_off_t filesize = 0;
   const char *filename = strrchr(ftpurl, '/') + 1;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -70,24 +70,24 @@ int main(void)
     /* Switch on full protocol/debug output */
     /* curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); */
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(CURLE_OK == res) {
+    if(CURLE_OK == result) {
       /* https://curl.se/libcurl/c/curl_easy_getinfo.html */
-      res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
-      if((CURLE_OK == res) && (filetime >= 0)) {
+      result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
+      if((CURLE_OK == result) && (filetime >= 0)) {
         time_t file_time = (time_t)filetime;
         printf("filetime %s: %s", filename, ctime(&file_time));
       }
-      res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
-                              &filesize);
-      if((CURLE_OK == res) && (filesize > 0))
+      result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
+                                 &filesize);
+      if((CURLE_OK == result) && (filesize > 0))
         printf("filesize %s: %" CURL_FORMAT_CURL_OFF_T " bytes\n",
                filename, filesize);
     }
     else {
       /* we failed */
-      fprintf(stderr, "curl told us %d\n", res);
+      fprintf(stderr, "curl told us %d\n", result);
     }
 
     /* always cleanup */
@@ -96,5 +96,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index c46fa057eb8018f783cd83f73bf3eb89505f98d8..c05f989f9a9dce2f2523f404e48207fae6d6ed3d 100644 (file)
@@ -48,13 +48,13 @@ static size_t write_response(void *ptr, size_t size, size_t nmemb, void *data)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   FILE *ftpfile;
   FILE *respfile;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* local filename to store the file as */
   ftpfile = fopen(FTPBODY, "wb"); /* b is binary, needed on Windows */
@@ -80,11 +80,11 @@ int main(void)
        CURLOPT_WRITEFUNCTION as well */
     curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
     curl_easy_setopt(curl, CURLOPT_HEADERDATA, respfile);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -95,5 +95,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 38844bb21915e0bd6834b33226ed0c519229ed75..fc56bb4ca20942a358637672790a1ec1e16f2881 100644 (file)
@@ -55,15 +55,15 @@ static size_t write_cb(void *buffer, size_t size, size_t nmemb, void *stream)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   struct FtpFile ftpfile = {
     "yourfile.bin", /* name to store the file as if successful */
     NULL
   };
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -85,14 +85,14 @@ int main(void)
     /* Switch on full protocol/debug output */
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
 
-    if(CURLE_OK != res) {
+    if(CURLE_OK != result) {
       /* we failed */
-      fprintf(stderr, "curl told us %d\n", res);
+      fprintf(stderr, "curl told us %d\n", result);
     }
   }
 
@@ -101,5 +101,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 36663d5afb3136da14175c80985bd253c455bf03..85b68da1bf7456860b57d1d1cb26fe970c9c6f30 100644 (file)
@@ -80,7 +80,7 @@ static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   FILE *hd_src;
   struct stat file_info;
   curl_off_t fsize;
@@ -106,10 +106,10 @@ int main(void)
   printf("Local file size: %" CURL_FORMAT_CURL_OFF_T " bytes.\n", fsize);
 
   /* In Windows, this inits the Winsock stuff */
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res) {
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result) {
     fclose(hd_src);
-    return (int)res;
+    return (int)result;
   }
 
   /* get a curl handle */
@@ -141,11 +141,11 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, fsize);
 
     /* Now run off and do what you have been told! */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* clean up the FTP commands list */
     curl_slist_free_all(headerlist);
@@ -156,5 +156,5 @@ int main(void)
   fclose(hd_src); /* close the local file */
 
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 7c75f2b8d759d72cd597acd8291e3c4faccadd91..db06edcd9f172ec29c1e62308f6993d2e897edd8 100644 (file)
@@ -70,7 +70,7 @@ static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
   struct WriteThis upload;
 
@@ -78,11 +78,11 @@ int main(void)
   upload.sizeleft = strlen(data);
 
   /* In Windows, this inits the Winsock stuff */
-  res = curl_global_init(CURL_GLOBAL_DEFAULT);
+  result = curl_global_init(CURL_GLOBAL_DEFAULT);
   /* Check for errors */
-  if(res != CURLE_OK) {
+  if(result != CURLE_OK) {
     fprintf(stderr, "curl_global_init() failed: %s\n",
-            curl_easy_strerror(res));
+            curl_easy_strerror(result));
     return 1;
   }
 
@@ -112,16 +112,16 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
                      (curl_off_t)upload.sizeleft);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 30305f62fe6c72e58466d10d5ec68b896e8ba082..4908505ea16ef98db881f9434deaf42ba534c122 100644 (file)
@@ -77,7 +77,7 @@ static int upload(CURL *curl, const char *remotepath,
 {
   FILE *f;
   long uploaded_len = 0;
-  CURLcode res = CURLE_GOT_NOTHING;
+  CURLcode result = CURLE_GOT_NOTHING;
   int c;
 
   f = fopen(localpath, "rb");
@@ -111,7 +111,7 @@ static int upload(CURL *curl, const char *remotepath,
 
   curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
-  for(c = 0; (res != CURLE_OK) && (c < tries); c++) {
+  for(c = 0; (result != CURLE_OK) && (c < tries); c++) {
     /* are we resuming? */
     if(c) { /* yes */
       /* determine the length of the file already written */
@@ -125,8 +125,8 @@ static int upload(CURL *curl, const char *remotepath,
       curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
       curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
-      res = curl_easy_perform(curl);
-      if(res != CURLE_OK)
+      result = curl_easy_perform(curl);
+      if(result != CURLE_OK)
         continue;
 
       curl_easy_setopt(curl, CURLOPT_NOBODY, 0L);
@@ -140,15 +140,15 @@ static int upload(CURL *curl, const char *remotepath,
       curl_easy_setopt(curl, CURLOPT_APPEND, 0L);
     }
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 
   fclose(f);
 
-  if(res == CURLE_OK)
+  if(result == CURLE_OK)
     return 1;
   else {
-    fprintf(stderr, "%s\n", curl_easy_strerror(res));
+    fprintf(stderr, "%s\n", curl_easy_strerror(result));
     return 0;
   }
 }
@@ -157,9 +157,9 @@ int main(void)
 {
   CURL *curl = NULL;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
index 8d433753950727539f4d7a1b2577d53f84f1b6b2..66bb69b8ae5b33149c80051a8da10b49cec5e433 100644 (file)
@@ -33,21 +33,21 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(CURLE_OK == res) {
+    if(CURLE_OK == result) {
       char *ct;
       /* ask for the content-type */
-      res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
+      result = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
 
-      if((CURLE_OK == res) && ct)
+      if((CURLE_OK == result) && ct)
         printf("We received Content-Type: %s\n", ct);
     }
 
@@ -55,5 +55,5 @@ int main(void)
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index d4d8960487a18947f818f4269166473d94a4d319..ea4da5dd9d0fc1bb6d7024a7d92236b42516430d 100644 (file)
@@ -60,13 +60,13 @@ static size_t write_cb(void *contents, size_t size, size_t nmemb, void *userp)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
   struct MemoryStruct chunk;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   chunk.memory = malloc(1); /* grown as needed by the realloc above */
   chunk.size = 0;           /* no data at this point */
@@ -89,12 +89,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
 
     /* get it! */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* check for errors */
-    if(res != CURLE_OK) {
+    if(result != CURLE_OK) {
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
     }
     else {
       /*
@@ -116,5 +116,5 @@ int main(void)
   /* we are done with libcurl, so clean it up */
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 6ad9b9c1aa5c5090092fb4756e249a3faf892848..fabfc594bc5ed85a39da2f29ef58410efa4df10d 100644 (file)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   char *location;
   long response_code;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -46,22 +46,22 @@ int main(void)
 
     /* example.com is redirected, figure out the redirection! */
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
     else {
-      res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
-      if((res == CURLE_OK) && ((response_code / 100) != 3)) {
+      result = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
+      if((result == CURLE_OK) && ((response_code / 100) != 3)) {
         /* a redirect implies a 3xx response code */
         fprintf(stderr, "Not a redirect.\n");
       }
       else {
-        res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &location);
+        result = curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &location);
 
-        if((res == CURLE_OK) && location) {
+        if((result == CURLE_OK) && location) {
           /* This is the new absolute URL that you could redirect to, even if
            * the Location: response header may have been a relative URL. */
           printf("Redirected to: %s\n", location);
@@ -73,5 +73,5 @@ int main(void)
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 6827055c2bd9bc3f2f4f7fe8d479400dbefff660..ac190f3fa1d555ada1c9ff1419ffd5ca7f30630d 100644 (file)
@@ -33,25 +33,25 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_REFERER, "https://example.org/referrer");
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
     else {
       char *hdr;
-      res = curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
-      if((res == CURLE_OK) && hdr)
+      result = curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
+      if((result == CURLE_OK) && hdr)
         printf("Referrer header: %s\n", hdr);
     }
 
index 9a6645fa5f7fa1288c047608e273b0b5dd44daf1..20a8a2de2d2fe4feae2e1dc505aaf1bca48fdcda 100644 (file)
@@ -138,12 +138,12 @@ static void check_multi_info(struct GlobalInfo *g)
   while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
     if(msg->msg == CURLMSG_DONE) {
       CURL *curl = msg->easy_handle;
-      CURLcode res = msg->data.result;
+      CURLcode result = msg->data.result;
       char *eff_url;
       struct ConnInfo *conn;
       curl_easy_getinfo(curl, CURLINFO_PRIVATE, &conn);
       curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &eff_url);
-      MSG_OUT("DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+      MSG_OUT("DONE: %s => (%d) %s\n", eff_url, result, conn->error);
       curl_multi_remove_handle(g->multi, curl);
       free(conn->url);
       curl_easy_cleanup(curl);
@@ -433,9 +433,9 @@ int main(void)
   int fd;
   GIOChannel *ch;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   fd = init_fifo();
   if(fd == CURL_SOCKET_BAD) {
index e1fa33b8f62d6eae8f765dd55cc05dad120bf52d..cbc60acc94a20b9e2955335f4fedf6f6c9640c0a 100644 (file)
@@ -41,9 +41,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -55,12 +55,12 @@ int main(void)
     /* this example just ignores the content */
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     if(CURLHE_OK == curl_easy_header(curl, "Content-Type", 0, CURLH_HEADER,
                                      -1, &header))
index ffef02f408eb4de5b8a0822eb2ac0032b5f31e2e..4bdba3607a26b96eb1444d107e507227ef56554b 100644 (file)
@@ -178,10 +178,10 @@ static void check_multi_info(struct GlobalInfo *g)
   while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
     if(msg->msg == CURLMSG_DONE) {
       CURL *curl = msg->easy_handle;
-      CURLcode res = msg->data.result;
+      CURLcode result = msg->data.result;
       curl_easy_getinfo(curl, CURLINFO_PRIVATE, &conn);
       curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &eff_url);
-      fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+      fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, result, conn->error);
       curl_multi_remove_handle(g->multi, curl);
       free(conn->url);
       curl_easy_cleanup(curl);
@@ -421,14 +421,14 @@ static void clean_fifo(struct GlobalInfo *g)
 
 int main(int argc, char **argv)
 {
-  CURLcode res;
+  CURLcode result;
   struct GlobalInfo g;
   (void)argc;
   (void)argv;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   memset(&g, 0, sizeof(g));
   g.evbase = event_base_new();
index cd6c30f9c6b603a5cccd5b0eac0f58f3a6b16124..9ae1ff5b0fa7b4a615472b2bc91940cfe56e0ffb 100644 (file)
@@ -87,9 +87,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -113,16 +113,16 @@ int main(void)
 
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index a3ecc01df17508a24da795151e985300727780f5..3cd4f2a5ba7a4382375499683e70289c4997a8e4 100644 (file)
@@ -81,16 +81,16 @@ int main(int argc, char **argv)
   TidyDoc tdoc;
   TidyBuffer docbuf = { 0 };
   TidyBuffer tidy_errbuf = { 0 };
-  CURLcode res;
+  CURLcode result;
 
   if(argc != 2) {
     printf("usage: %s <url>\n", argv[0]);
     return 1;
   }
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   tdoc = tidyCreate();
   tidyOptSetBool(tdoc, TidyForceOutput, yes); /* try harder */
@@ -107,14 +107,14 @@ int main(int argc, char **argv)
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
 
     curl_easy_setopt(curl, CURLOPT_WRITEDATA, &docbuf);
-    res = curl_easy_perform(curl);
-    if(!res) {
-      res = tidyParseBuffer(tdoc, &docbuf); /* parse the input */
-      if(res >= 0) {
-        res = tidyCleanAndRepair(tdoc); /* fix any problems */
-        if(res >= 0) {
-          res = tidyRunDiagnostics(tdoc); /* load tidy error buffer */
-          if(res >= 0) {
+    result = curl_easy_perform(curl);
+    if(!result) {
+      result = tidyParseBuffer(tdoc, &docbuf); /* parse the input */
+      if(result >= 0) {
+        result = tidyCleanAndRepair(tdoc); /* fix any problems */
+        if(result >= 0) {
+          result = tidyRunDiagnostics(tdoc); /* load tidy error buffer */
+          if(result >= 0) {
             dumpNode(tdoc, tidyGetRoot(tdoc), 0); /* walk the tree */
             fprintf(stderr, "%s\n", tidy_errbuf.bp); /* show errors */
           }
@@ -134,5 +134,5 @@ int main(int argc, char **argv)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 4d698f253c13ea874cbb44edcf8077ce5e16d6fa..84e02f5c6bfba80fccf79ebefaeb3425474a9485 100644 (file)
@@ -86,7 +86,7 @@ static size_t writer(char *data, size_t size, size_t nmemb,
 //
 static bool init(CURL *&curl, const char *url)
 {
-  CURLcode res;
+  CURLcode result;
 
   curl = curl_easy_init();
 
@@ -95,32 +95,32 @@ static bool init(CURL *&curl, const char *url)
     return false;
   }
 
-  res = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
-  if(res != CURLE_OK) {
-    fprintf(stderr, "Failed to set error buffer [%d]\n", res);
+  result = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
+  if(result != CURLE_OK) {
+    fprintf(stderr, "Failed to set error buffer [%d]\n", result);
     return false;
   }
 
-  res = curl_easy_setopt(curl, CURLOPT_URL, url);
-  if(res != CURLE_OK) {
+  result = curl_easy_setopt(curl, CURLOPT_URL, url);
+  if(result != CURLE_OK) {
     fprintf(stderr, "Failed to set URL [%s]\n", errorBuffer);
     return false;
   }
 
-  res = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
-  if(res != CURLE_OK) {
+  result = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+  if(result != CURLE_OK) {
     fprintf(stderr, "Failed to set redirect option [%s]\n", errorBuffer);
     return false;
   }
 
-  res = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
-  if(res != CURLE_OK) {
+  result = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
+  if(result != CURLE_OK) {
     fprintf(stderr, "Failed to set writer [%s]\n", errorBuffer);
     return false;
   }
 
-  res = curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
-  if(res != CURLE_OK) {
+  result = curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
+  if(result != CURLE_OK) {
     fprintf(stderr, "Failed to set write data [%s]\n", errorBuffer);
     return false;
   }
@@ -253,7 +253,7 @@ static void parseHtml(const std::string &html,
 int main(int argc, char *argv[])
 {
   CURL *curl = NULL;
-  CURLcode res;
+  CURLcode result;
   std::string title;
 
   // Ensure one argument is given
@@ -263,9 +263,9 @@ int main(int argc, char *argv[])
     return EXIT_FAILURE;
   }
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   // Initialize CURL handle
 
@@ -277,10 +277,10 @@ int main(int argc, char *argv[])
 
   // Retrieve content for the URL
 
-  res = curl_easy_perform(curl);
+  result = curl_easy_perform(curl);
   curl_easy_cleanup(curl);
 
-  if(res != CURLE_OK) {
+  if(result != CURLE_OK) {
     fprintf(stderr, "Failed to get '%s' [%s]\n", argv[1], errorBuffer);
     return EXIT_FAILURE;
   }
@@ -291,5 +291,5 @@ int main(int argc, char *argv[])
   // Display the extracted title
   printf("Title: %s\n", title.c_str());
 
-  return (int)res;
+  return (int)result;
 }
index f1542edbbe5b69a149964e896a768e1df2fc26a7..105f9964368380dc1b811d468ba5ce546394d86f 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -49,12 +49,12 @@ int main(void)
        from libcurl as this exits anyway */
     curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index 510c4c38396c600be23a5f71e6ec6a60cece477d..dac8953b727c72af8eba5ebeb89f6a6392f6a807 100644 (file)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
   /* In Windows, this inits the Winsock stuff */
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* get a curl handle */
   curl = curl_easy_init();
@@ -49,16 +49,16 @@ int main(void)
     /* Now specify the POST data */
     curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl");
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 635a8c7177293f0de1db26ce892241909d2e63d2..a9a0a8a9f7b2be204821940d056000a7a61b83bd 100644 (file)
@@ -189,7 +189,7 @@ static int setup(struct transfer *t, int num)
  */
 int main(int argc, char **argv)
 {
-  CURLcode res;
+  CURLcode result;
   struct transfer *trans;
   CURLM *multi = NULL;
   int i;
@@ -205,9 +205,9 @@ int main(int argc, char **argv)
   else
     num_transfers = 3; /* a suitable low default */
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   trans = calloc(num_transfers, sizeof(*trans));
   if(!trans) {
index d9bc038a02989505f7aeb7260a8118458714627f..37816742c0b393edf9d80977dd6ef6bfc7129e1c 100644 (file)
@@ -125,9 +125,9 @@ int main(void)
   int transfers = 1; /* we start with one */
   int i;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* init a multi stack */
   multi = curl_multi_init();
index a0e82bd5e8cec14639a8e09e946fd00216d02093..e646ce1e4b6c32051e39a163434c9fdd9a678d78 100644 (file)
@@ -215,7 +215,7 @@ static int server_push_callback(CURL *parent,
  */
 int main(int argc, char *argv[])
 {
-  CURLcode res;
+  CURLcode result;
   CURL *curl;
   CURLM *multi;
   int transfers = 1; /* we start with one */
@@ -224,9 +224,9 @@ int main(int argc, char *argv[])
   if(argc == 2)
     url = argv[1];
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* init a multi stack */
   multi = curl_multi_init();
index 318822b8f2604791d56282dc154a1af8356c296e..1ebc993bfd6f42ce9bfaa61fdb45bfd371fa17ba 100644 (file)
@@ -287,7 +287,7 @@ static int setup(struct input *t, int num, const char *upload)
  */
 int main(int argc, char **argv)
 {
-  CURLcode res;
+  CURLcode result;
   struct input *trans;
   CURLM *multi = NULL;
   int i;
@@ -308,9 +308,9 @@ int main(int argc, char **argv)
   else
     num_transfers = 3;  /* a suitable low default */
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   trans = calloc(num_transfers, sizeof(*trans));
   if(!trans) {
index 0052d501886627f34cd9b1adb248f20f7c161317..ee9bdce2d919bd2d0ab47f2b5ee9246410e6e5a5 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   curl_version_info_data *ver;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   ver = curl_version_info(CURLVERSION_NOW);
   if(ver->features & CURL_VERSION_HTTP2)
index 99de5f8e2e223bdd0631f29e5c2061063e59c0cc..702c7d9ac39e3f3da36ce3cc52510f9307ad3f26 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -44,12 +44,12 @@ int main(void)
     /* Use HTTP/3 but fallback to earlier HTTP if necessary */
     curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index 3af5c1a2dbaeb1ec2c20d7778771577cbad3c079..7888dfab381acfc5e279a1ec4261aeb52acbc8f1 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -60,11 +60,11 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "localhost");
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -73,5 +73,5 @@ int main(void)
     curl_slist_free_all(chunk);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 4fd92aaffbef9346b960743c2195f8f4b7b2a98a..7163756a365826aa0aeb362891fac4c13a0088d1 100644 (file)
@@ -50,7 +50,7 @@ static const char olivertwist[] =
 int main(int argc, char **argv)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   char *url;
 
   if(argc < 2)
@@ -59,9 +59,9 @@ int main(int argc, char **argv)
   url = argv[1];
 
   /* In Windows, this inits the Winsock stuff */
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* get a curl handle */
   curl = curl_easy_init();
@@ -89,11 +89,11 @@ int main(int argc, char **argv)
     curl_easy_setopt(curl, CURLOPT_URL, url);
 
     /* Now run off and do what you have been told! */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -103,5 +103,5 @@ int main(int argc, char **argv)
   }
 
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 8892d76f077a1c06057572bf434f37930d8a39f0..9a8163ce88a46c11121212bfe24826187303e67e 100644 (file)
@@ -76,7 +76,7 @@ static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
 int main(int argc, char **argv)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   FILE *hd_src;
   struct stat file_info;
 
@@ -103,10 +103,10 @@ int main(int argc, char **argv)
   }
 
   /* In Windows, this inits the Winsock stuff */
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res) {
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result) {
     fclose(hd_src);
-    return (int)res;
+    return (int)result;
   }
 
   /* get a curl handle */
@@ -131,11 +131,11 @@ int main(int argc, char **argv)
                      (curl_off_t)file_info.st_size);
 
     /* Now run off and do what you have been told! */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -143,5 +143,5 @@ int main(int argc, char **argv)
   fclose(hd_src); /* close the local file */
 
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 02fd8b87bd16f7e40248185b78669ea1e3d8eac3..7bb11d21e098fe7686f6d93afbb5569049e1de2b 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -68,12 +68,12 @@ int main(void)
     /* cache the CA cert bundle in memory for a week */
     curl_easy_setopt(curl, CURLOPT_CA_CACHE_TIMEOUT, 604800L);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -81,5 +81,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index e3665d012825e5ee74b2392ac7f101d494d7af40..7bd75edd9336f72fc4d773c43c9bc0f43e2aabb8 100644 (file)
@@ -87,9 +87,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -117,12 +117,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_INFILESIZE, infilesize);
 
     /* Perform the append */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -130,5 +130,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 690b1d77c73fddf0250f6443c30801afd5db1500..bf9a61f6af706cd620484ea82100fc82f72d17f4 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -60,12 +60,12 @@ int main(void)
                      "imap://imap.example.com/INBOX/;UID=1");
 
     /* Perform the fetch */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -73,5 +73,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 7a5b52e10f2de1b94b49728f178b7f189ba0c5c0..91d95b12a65adb856226487f78d7a65bcd2821e8 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -60,12 +60,12 @@ int main(void)
      * imap-store.c for more information on deleting messages. */
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -73,5 +73,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 2477a00385c77e2e303def556f041ef8cc686b41..259dc2232f7d225973ab8889822d2ed8f9bb515b 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -56,12 +56,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "CREATE FOLDER");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 6744613cd1e745b86a004d50756d57bcb0aeb2a8..03e9d2ad7d489d8b6ff296bdc80191bee0d7d558 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -56,12 +56,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE FOLDER");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 32f38493f133d5d179536e2c4c368584b3fcb0b0..fcb960ce50162c759094a26fb1f5fc50265b3905 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -56,12 +56,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXAMINE OUTBOX");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index ab25ba552bb3402bc43ac53c96a33b86ca23a8b0..b067d15385946c4fb7c0f16dae243fc590891f02 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -54,12 +54,12 @@ int main(void)
                      "imap://imap.example.com/INBOX/;UID=1");
 
     /* Perform the fetch */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -67,5 +67,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index e0201e464ac5ada750dd0e13f2359c29f1db20d9..263219ededb525d0511f6d53afac97a0ac832915 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -55,12 +55,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
 
     /* Perform the list */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -68,5 +68,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index e96751856512a23ae436c547e7abdb9b2c609f40..75dbd3ceaec642c7026517b623e2fa64ad25ebce 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -57,12 +57,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "LSUB \"\" *");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -70,5 +70,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 3d56cb1e3df675547b4dd36796e3fff1ec4862d2..35aff98ad95babe747abd20ff1ef22e745da9637 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
index a4a53ead4f6e541b7c8043d34df8536be07aa371..940724291802b8898f356e69dc07500f7d1a4dc2 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -56,12 +56,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOOP");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index ebef27b3696903fb97fc5895f91d6e437d4c2b6a..c548829cb5264ef007e343691f4bb3e729d7a900 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -60,12 +60,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "SEARCH NEW");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -73,5 +73,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 52448f492d16110482f5c885c87c90eaf6376ae6..0ec84d7472a020600ea4cf20e9916aa421e15d46 100644 (file)
@@ -40,9 +40,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -81,12 +81,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
     /* Perform the fetch */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -94,5 +94,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index c70c70ebce42c1f5575064c98d0e0cb5e0ea38cf..db0310b6b0f0451249ee609d1c227a9b465b5121 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -58,24 +58,24 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STORE 1 +Flags \\Deleted");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
     else {
       /* Set the EXPUNGE command, although you can use the CLOSE command if you
        * do not want to know the result of the STORE */
       curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPUNGE");
 
       /* Perform the second custom request */
-      res = curl_easy_perform(curl);
+      result = curl_easy_perform(curl);
 
       /* Check for errors */
-      if(res != CURLE_OK)
+      if(result != CURLE_OK)
         fprintf(stderr, "curl_easy_perform() failed: %s\n",
-                curl_easy_strerror(res));
+                curl_easy_strerror(result));
     }
 
     /* Always cleanup */
@@ -84,5 +84,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 61f4cea45bfda3ecd3ce9f6732066d23d5242a2b..6c09380221e7addb6f6430c434fc4e40c678b6a4 100644 (file)
@@ -40,9 +40,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -81,12 +81,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
     /* Perform the fetch */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -94,5 +94,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 904131c93a839e3d547c11ef51042c954ef8caac..cfe3180f5614f9945f5d937006e08389017aed48 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -46,7 +46,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_INTERFACE, "enp3s0");
     curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -54,5 +54,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index d16bfc43934646dd68277775abcc1cffedff0894..03e2a0726c23371cdce0063e3a819d7c39897bd5 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -43,12 +43,12 @@ int main(void)
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 5f5c39f57ac8729729ca1b47a49d39721673a0d4..7427673394a7afa3a72a86dd2df33b635ac832f6 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -53,12 +53,12 @@ int main(void)
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 21e632d8a7a9a41bd8d91946e388a9860a153f7a..6cb863cd8dbb78de1c91babf49f38fbdf9dc1854 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -47,7 +47,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 10L);
     curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -55,5 +55,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 0c5c1a3b5494bcbdb820019815d95244cfee02f2..3f651c059b54e5b791befd2f97c2d45beb98a615 100644 (file)
@@ -208,7 +208,7 @@ static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
 
 int main(void)
 {
-  CURLcode res;
+  CURLcode result;
   unsigned i;
   int total_failed = 0;
   char errbuf[CURL_ERROR_SIZE] = { 0, };
@@ -224,10 +224,10 @@ int main(void)
   transfer[1].bodyfile = "400.txt";
   transfer[1].logfile = "400_transfer_log.txt";
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res) {
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result) {
     fprintf(stderr, "curl_global_init failed\n");
-    return (int)res;
+    return (int)result;
   }
 
   /* You could enable global tracing for extra verbosity when verbosity is
@@ -277,7 +277,7 @@ int main(void)
 
     if(t->bodyfp) {
       /* Perform the transfer */
-      CURLcode result = curl_easy_perform(t->curl);
+      result = curl_easy_perform(t->curl);
 
       /* Save the body file */
       fclose(t->bodyfp);
index 95231d600268edd0af4fc87b167e6e079971294d..0efcaeac1cdef8ebc4a331974b00d05c7bce58c5 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -56,12 +56,12 @@ int main(void)
     while(urls[i]) {
       curl_easy_setopt(curl, CURLOPT_URL, urls[i]);
 
-      /* Perform the request, res gets the return code */
-      res = curl_easy_perform(curl);
+      /* Perform the request, result gets the return code */
+      result = curl_easy_perform(curl);
       /* Check for errors */
-      if(res != CURLE_OK)
+      if(result != CURLE_OK)
         fprintf(stderr, "curl_easy_perform() failed: %s\n",
-                curl_easy_strerror(res));
+                curl_easy_strerror(result));
       i++;
     }
     /* always cleanup */
index faa91c0b66cc849f618d9fb680cd4403fb33a88b..44aec5bb2189873640ef2bb767d9f29ddd12f201 100644 (file)
@@ -46,9 +46,9 @@ int main(void)
 
   int i;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* Allocate one curl handle per transfer */
   for(i = 0; i < HANDLECOUNT; i++)
index 2f5e6ffdceb8802b1d64c60737af260adbce1712..3798f541b23319259e67f018c060b81485e8c757 100644 (file)
@@ -121,9 +121,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
index 4e1034477202e65b1890e056caad4a9867e199a9..04ea342ed8e63e7157d083580e298d52c90408e8 100644 (file)
@@ -38,9 +38,9 @@ int main(void)
   CURL *curl;
   CURL *curl2;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   curl2 = curl_easy_init();
index 2eb3977200ec3f574cf95efe2af326e9eab03b9e..b4e7b18083d6de59adc7784224147fa56af25798 100644 (file)
@@ -217,15 +217,15 @@ static int handle_socket(CURL *curl, curl_socket_t s, int action, void *userp,
 
 int main(int argc, char **argv)
 {
-  CURLcode res;
+  CURLcode result;
 
   if(argc <= 1)
     return 0;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res) {
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result) {
     fprintf(stderr, "Could not init curl\n");
-    return (int)res;
+    return (int)result;
   }
 
   base = event_base_new();
index 3e80393147b66939c4ca150dad5100734e231b0e..6611f2f12e0c0e1b7642b77727567350a1af6776 100644 (file)
@@ -43,9 +43,9 @@ int main(void)
   struct curl_slist *headerlist = NULL;
   static const char buf[] = "Expect:";
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   CURL_IGNORE_DEPRECATION(
     /* Fill in the file upload field. This makes libcurl load data from
index d270cf2972f95b573355c3e21ae5b7b77b033da9..1c14ea0bd0ec43440c011f5b8183d67c301cb6f8 100644 (file)
@@ -52,9 +52,9 @@ int main(void)
 
   int i;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* Allocate one curl handle per transfer */
   for(i = 0; i < HANDLECOUNT; i++)
index 68bcc37e968795c6cfabff4a079ef6dea1f74cb3..48db32ff394eca5f7450a7840d5912c4a04249cd 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
index d8a430b31c187485b483dbcb9abe4062bca203c7..0cf18891fd784602bc207ce0285b1ba97158ccf5 100644 (file)
@@ -38,9 +38,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -66,7 +66,8 @@ int main(void)
           mresult = curl_multi_poll(multi, NULL, 0, 1000, NULL);
 
         if(mresult) {
-          fprintf(stderr, "curl_multi_poll() failed, code %d.\n", (int)mresult);
+          fprintf(stderr, "curl_multi_poll() failed, code %d.\n",
+                  (int)mresult);
           break;
         }
 
index 13689ad3f8efa3ee4aa98ac12e58097c74a0047e..dd0102c264c312d7a54896feabb36332e400869b 100644 (file)
@@ -229,16 +229,16 @@ static int cb_socket(CURL *curl, curl_socket_t s, int action,
 
 int main(int argc, char **argv)
 {
-  CURLcode res;
+  CURLcode result;
   struct datauv uv = { 0 };
   int running_handles;
 
   if(argc <= 1)
     return 0;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   uv.loop = uv_default_loop();
   uv_timer_init(uv.loop, &uv.timeout);
index a9eaebff88ee789898ff45e6f88756285bd8a287..8bc998ae43966326e267894ff9f1863317665261 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -43,12 +43,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_NETRC_FILE, "/home/daniel/s3cr3ts.txt");
     curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 7cde055d69b88d2a626a9ad77b664093b90a69dc..50d110f3e0f15ad92bd05c179b0bd1e95f54dd60 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -45,23 +45,23 @@ int main(void)
     /* get the first document */
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* get another document from the same server using the same
        connection */
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/docs/");
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 85c28d700ee04bff218818e21aa0eee14ddeabb5..ed7993d85fa57e7aafc2ea7d4e692e1c7d677687 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -59,12 +59,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
 
     /* Perform the retr */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index bd220d71693ade8e52e3a77f9532847d072170bd..f872b882e4f8afd882b1e7577a04e7b1d0b19c8e 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -59,12 +59,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index cef33c2b4f27ac66835b1c51751b84fb5ad6a88c..7cc9a249d5a01d8736abc9a8dcd6d26b770b9f71 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -53,12 +53,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
 
     /* Perform the list */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -66,5 +66,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 022ab928c8ef0356d1d8c412b17eddaa0c354ff7..741b7f8d2d7270b06740c126b5a0d69ace7d722d 100644 (file)
 
 int main(void)
 {
-  CURLcode res;
+  CURLcode result;
   CURL *curl;
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
index 4bed103fc83faffa43bec0cdee55070e88e268fc..5e05713ec62887bf1484bd9260f7fe6f33e56398 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -59,12 +59,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 5cb6e1b545760cee904b7f20dd5252cafbcbd840..af7e40293a3377b1fec901d7c1a847f0cde85e47 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -53,12 +53,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
 
     /* Perform the retr */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -66,5 +66,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 4dd808c3f1141aa623accc36c5f7de8687e990a2..c38d41152a5a1ff9e64c11985a95d4fd94cd71c4 100644 (file)
@@ -40,9 +40,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -80,12 +80,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
     /* Perform the retr */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -93,5 +93,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 929422af98294a1bc50b199a28d1c235894b0604..160f013d2d4d3145b06298cc7bd3e087c96bdeb4 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -59,12 +59,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -72,5 +72,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 7693e632192802b889870ef7ca91de57a722d2bf..4258088722bd54440c26888fe2bbb235204e9c94 100644 (file)
@@ -40,9 +40,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -80,12 +80,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
     /* Perform the retr */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -93,5 +93,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 3a8776f0b220b72c31eb3635eae9ca9cf9b70374..b9614876850146307ea07e7255ecf634723f9d7c 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -56,12 +56,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "TOP 1 0");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 01df011eefc34b8ebf96bb57f25e58968c5e5ebc..4cf571621a1e67d8e95faa1a7f5769602b526b3b 100644 (file)
@@ -39,9 +39,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -56,12 +56,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "UIDL");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Always cleanup */
     curl_easy_cleanup(curl);
@@ -69,5 +69,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 0df09a34bf4596b458747d5a0670a2496b11d1ab..729642cbce6a220f44fc6779a70243f094b97b23 100644 (file)
@@ -68,7 +68,7 @@ static size_t read_cb(char *dest, size_t size, size_t nmemb, void *userp)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
   struct WriteThis wt;
 
@@ -76,12 +76,12 @@ int main(void)
   wt.sizeleft = strlen(data);
 
   /* In Windows, this inits the Winsock stuff */
-  res = curl_global_init(CURL_GLOBAL_DEFAULT);
+  result = curl_global_init(CURL_GLOBAL_DEFAULT);
   /* Check for errors */
-  if(res != CURLE_OK) {
+  if(result != CURLE_OK) {
     fprintf(stderr, "curl_global_init() failed: %s\n",
-            curl_easy_strerror(res));
-    return (int)res;
+            curl_easy_strerror(result));
+    return (int)result;
   }
 
   /* get a curl handle */
@@ -114,7 +114,7 @@ int main(void)
       struct curl_slist *chunk = NULL;
 
       chunk = curl_slist_append(chunk, "Transfer-Encoding: chunked");
-      res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
+      result = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
       /* use curl_slist_free_all() after the *perform() call to free this
          list again */
     }
@@ -137,18 +137,18 @@ int main(void)
       struct curl_slist *chunk = NULL;
 
       chunk = curl_slist_append(chunk, "Expect:");
-      res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
+      result = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
       /* use curl_slist_free_all() after the *perform() call to free this
          list again */
     }
 #endif
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index 0a2964f1c64d512b20463d7a1018c1638cbadcc2..f310c144896506af304f390629272486d71274bf 100644 (file)
@@ -59,13 +59,13 @@ static size_t write_cb(void *contents, size_t size, size_t nmemb, void *userp)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   struct MemoryStruct chunk;
   static const char *postthis = "Field=1&Field=2&Field=3";
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   chunk.memory = malloc(1);  /* grown as needed by realloc above */
   chunk.size = 0;            /* no data at this point */
@@ -89,12 +89,12 @@ int main(void)
     /* if we do not provide POSTFIELDSIZE, libcurl calls strlen() by itself */
     curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK) {
+    if(result != CURLE_OK) {
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
     }
     else {
       /*
index 7e5f08ef6617e665f446742f66fcc4b7ae0bd152..aee12ab0ac548f9d2d49e97efb4e0cd7635a91d6 100644 (file)
 int main(int argc, char *argv[])
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
   struct curl_httppost *formpost = NULL;
   struct curl_httppost *lastptr = NULL;
   struct curl_slist *headerlist = NULL;
   static const char buf[] = "Expect:";
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   CURL_IGNORE_DEPRECATION(
     /* Fill in the file upload field */
@@ -96,12 +96,12 @@ int main(int argc, char *argv[])
       curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
     )
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index e5cb9633695317d9f8739b84844b572563c5b13b..4535bed6e1ab28fffa280219bcded911bc202e31 100644 (file)
@@ -46,9 +46,9 @@ int main(int argc, char *argv[])
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -85,12 +85,12 @@ int main(int argc, char *argv[])
       curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
     curl_easy_setopt(curl, CURLOPT_MIMEPOST, form);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index 41a87f2bf9a004f5bb75bebe57fef0085e212e65..22f876b5c83c6483f05d07b7a52079c48b97385a 100644 (file)
@@ -77,9 +77,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -95,14 +95,14 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &prog);
 
     curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(res != CURLE_OK)
-      fprintf(stderr, "%s\n", curl_easy_strerror(res));
+    if(result != CURLE_OK)
+      fprintf(stderr, "%s\n", curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 50b31cb9ea57678b79270d910559b2b64678f8a9..e8d8540089f9cb9daf05f19d9f37d4758384cf7a 100644 (file)
@@ -38,9 +38,9 @@ int main(void)
   curl_version_info_data *ver;
   const char * const *ptr;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   ver = curl_version_info(CURLVERSION_NOW);
   printf("Protocols:\n");
index ec85ed878dc30ffcc5b30d63ef5f034f33305650..9555725dabf5a2a4da942d87a67100600429b626 100644 (file)
@@ -31,20 +31,20 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
     curl_easy_setopt(curl, CURLOPT_RANGE, "200-999");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 95adb3c1baaa4bc3a76d2bf40dcadc70060e9f9e..e56c8efb8743dacd1cc1b09b418b1537525271f2 100644 (file)
@@ -42,15 +42,15 @@ int main(void)
   struct curl_slist *host = curl_slist_append(NULL,
                                               "example.com:443:127.0.0.1");
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
@@ -59,5 +59,5 @@ int main(void)
   curl_slist_free_all(host);
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 5e732e105f5c94df7e5f542c3e24689811f505e9..7c7ff945f9624fbe03c268e21b37d31b7e4a9c6e 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -45,12 +45,12 @@ int main(void)
 
     curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index e0bf417e481b7a5273f7240369e0f7d7a3155d37..21a09b65841eb66496dae4821e5de7263383d55f 100644 (file)
@@ -83,9 +83,9 @@ int main(void)
   const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
   size_t request_len = strlen(request);
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* A general note of caution here: if you are using curl_easy_recv() or
      curl_easy_send() to implement HTTP or _any_ other protocol libcurl
@@ -103,18 +103,18 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     /* Do not do the transfer - only connect to host */
     curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(res != CURLE_OK) {
-      printf("Error: %s\n", curl_easy_strerror(res));
+    if(result != CURLE_OK) {
+      printf("Error: %s\n", curl_easy_strerror(result));
       return 1;
     }
 
     /* Extract the socket from the curl handle - we need it for waiting. */
-    res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+    result = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
 
-    if(res != CURLE_OK) {
-      printf("Error: %s\n", curl_easy_strerror(res));
+    if(result != CURLE_OK) {
+      printf("Error: %s\n", curl_easy_strerror(result));
       return 1;
     }
 
@@ -127,18 +127,18 @@ int main(void)
       size_t nsent;
       do {
         nsent = 0;
-        res = curl_easy_send(curl, request + nsent_total,
+        result = curl_easy_send(curl, request + nsent_total,
                              request_len - nsent_total, &nsent);
         nsent_total += nsent;
 
-        if(res == CURLE_AGAIN && !wait_on_socket(sockfd, 0, 60000L)) {
+        if(result == CURLE_AGAIN && !wait_on_socket(sockfd, 0, 60000L)) {
           printf("Error: timeout.\n");
           return 1;
         }
-      } while(res == CURLE_AGAIN);
+      } while(result == CURLE_AGAIN);
 
-      if(res != CURLE_OK) {
-        printf("Error: %s\n", curl_easy_strerror(res));
+      if(result != CURLE_OK) {
+        printf("Error: %s\n", curl_easy_strerror(result));
         return 1;
       }
 
@@ -154,16 +154,16 @@ int main(void)
       size_t nread;
       do {
         nread = 0;
-        res = curl_easy_recv(curl, buf, sizeof(buf), &nread);
+        result = curl_easy_recv(curl, buf, sizeof(buf), &nread);
 
-        if(res == CURLE_AGAIN && !wait_on_socket(sockfd, 1, 60000L)) {
+        if(result == CURLE_AGAIN && !wait_on_socket(sockfd, 1, 60000L)) {
           printf("Error: timeout.\n");
           return 1;
         }
-      } while(res == CURLE_AGAIN);
+      } while(result == CURLE_AGAIN);
 
-      if(res != CURLE_OK) {
-        printf("Error: %s\n", curl_easy_strerror(res));
+      if(result != CURLE_OK) {
+        printf("Error: %s\n", curl_easy_strerror(result));
         break;
       }
 
index 613bc26a3c7c7ec36c5a880fce1f2510092e772a..134ecb94a4c6b74b9fed878a5cda3702e2c2df85 100644 (file)
@@ -46,9 +46,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* init the curl session */
   curl = curl_easy_init();
@@ -91,7 +91,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_WRITEDATA, bodyfile);
 
     /* get it! */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* close the header file */
     fclose(headerfile);
@@ -105,5 +105,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index dec9fa988d2eb5019d1cef387cabbfcd2410fd5d..788ccf575b96d9a7c30799f8550cf2ad58b36400 100644 (file)
@@ -46,14 +46,14 @@ static CURL *curl;
 static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *stream)
 {
   const struct curl_tlssessioninfo *info;
-  CURLcode res;
+  CURLcode result;
 
   (void)stream;
   (void)ptr;
 
-  res = curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &info);
+  result = curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &info);
 
-  if(!res) {
+  if(!result) {
     unsigned int cert_list_size;
     const gnutls_datum_t *chainp;
 
@@ -96,9 +96,9 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *stream)
 
 int main(void)
 {
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -106,12 +106,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 470474cafd6c330a55fbe8c6c3ce15df6e8bf43b..f1484eb80c970560370d1959fad935c37c22f8b0 100644 (file)
@@ -70,9 +70,9 @@ int main(void)
     NULL
   };
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -96,14 +96,14 @@ int main(void)
     /* Switch on full protocol/debug output */
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
 
-    if(CURLE_OK != res) {
+    if(CURLE_OK != result) {
       /* we failed */
-      fprintf(stderr, "curl told us %d\n", res);
+      fprintf(stderr, "curl told us %d\n", result);
     }
   }
 
@@ -112,5 +112,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 9b78f96ee4ab96f7ea9f23ad0177c060c287a118..02f18897a31c80395e9d4d18709d5bd661de790a 100644 (file)
@@ -59,7 +59,7 @@ static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile)
   CURL *curl = curl_easy_init();
 
   if(curl) {
-    CURLcode res;
+    CURLcode result;
 
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
@@ -69,11 +69,11 @@ static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile)
     curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
     curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
 
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
                               &remoteFileSizeByte);
-      if(res)
+      if(result)
         return -1;
       printf("filesize: %" CURL_FORMAT_CURL_OFF_T "\n", remoteFileSizeByte);
     }
@@ -87,7 +87,7 @@ static int sftpResumeUpload(CURL *curl, const char *remotepath,
                             const char *localpath)
 {
   FILE *f = NULL;
-  CURLcode res = CURLE_GOT_NOTHING;
+  CURLcode result = CURLE_GOT_NOTHING;
 
   curl_off_t remoteFileSizeByte = sftpGetRemoteFileSize(remotepath);
   if(remoteFileSizeByte == -1) {
@@ -112,14 +112,14 @@ static int sftpResumeUpload(CURL *curl, const char *remotepath,
   fseek(f, (long)remoteFileSizeByte, SEEK_SET);
 #endif
   curl_easy_setopt(curl, CURLOPT_APPEND, 1L);
-  res = curl_easy_perform(curl);
+  result = curl_easy_perform(curl);
 
   fclose(f);
 
-  if(res == CURLE_OK)
+  if(result == CURLE_OK)
     return 1;
   else {
-    fprintf(stderr, "%s\n", curl_easy_strerror(res));
+    fprintf(stderr, "%s\n", curl_easy_strerror(result));
     return 0;
   }
 }
@@ -128,9 +128,9 @@ int main(void)
 {
   CURL *curl = NULL;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
index acaa610dec11ffdd2068df7b734edff8250678e2..475bb182a8cbf313fae16e162c85490eeb2157be 100644 (file)
@@ -52,9 +52,9 @@ int main(void)
   CURLSH *share;
   int i;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   share = curl_share_init();
   curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
@@ -73,12 +73,12 @@ int main(void)
       /* use the share object */
       curl_easy_setopt(curl, CURLOPT_SHARE, share);
 
-      /* Perform the request, res gets the return code */
-      res = curl_easy_perform(curl);
+      /* Perform the request, result gets the return code */
+      result = curl_easy_perform(curl);
       /* Check for errors */
-      if(res != CURLE_OK)
+      if(result != CURLE_OK)
         fprintf(stderr, "curl_easy_perform() failed: %s\n",
-                curl_easy_strerror(res));
+                curl_easy_strerror(result));
 
       /* always cleanup */
       curl_easy_cleanup(curl);
@@ -87,5 +87,5 @@ int main(void)
 
   curl_share_cleanup(share);
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index e7ea3be611534b991fb9f64747b420a12fdfe075..6f0751775f80d9b3b0e6430dd47bdf0cf244af24 100644 (file)
@@ -33,9 +33,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -43,12 +43,12 @@ int main(void)
     /* example.com is redirected, so we tell libcurl to follow redirection */
     curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index ff7295c59d3b231e805f7ca1865f6176e869da08..7b9356acf9ea3faa0a9c06c3e4ec3b2fe2d0e2fc 100644 (file)
@@ -36,9 +36,9 @@ int main(void)
 
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -48,16 +48,16 @@ int main(void)
     /* if we do not provide POSTFIELDSIZE, libcurl calls strlen() by itself */
     curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index c60b91057e9ae248a2f6df0951f2f1f16ed68cf8..9885dfd91de213d95853c7e9fbbdb9f786df4490 100644 (file)
@@ -51,7 +51,7 @@
 int main(void)
 {
   CURL *curl = NULL;
-  CURLcode res;
+  CURLcode result;
   FILE *headerfile;
   const char *pPassphrase = NULL;
 
@@ -70,9 +70,9 @@ int main(void)
   pKeyType = "PEM";
 #endif
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res) {
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result) {
+    return (int)result;
   }
 
   headerfile = fopen(pHeaderFile, "wb");
@@ -128,12 +128,12 @@ int main(void)
   /* disconnect if we cannot validate server's cert */
   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
 
-  /* Perform the request, res gets the return code */
-  res = curl_easy_perform(curl);
+  /* Perform the request, result gets the return code */
+  result = curl_easy_perform(curl);
   /* Check for errors */
-  if(res != CURLE_OK)
+  if(result != CURLE_OK)
     fprintf(stderr, "curl_easy_perform() failed: %s\n",
-            curl_easy_strerror(res));
+            curl_easy_strerror(result));
 
 error:
 
@@ -146,5 +146,5 @@ error:
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index bf165f7e42156789eb173d43f323c8ac8e39afab..1c9951dfceeb58172b21905d0458c19cad238ab7 100644 (file)
@@ -168,9 +168,9 @@ int main(int argc, char **argv)
   GtkWidget *top_window, *outside_frame, *inside_frame, *progress_bar;
 
   /* Must initialize libcurl before any threads are started */
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* Init thread */
   g_thread_init(NULL);
index f8e66069f87114957d593ff3326c7597e06c6283..64540cb033e9350911a034fb727a45dada9b85ee 100644 (file)
@@ -92,9 +92,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -137,12 +137,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
 
     /* Send the message */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Free the list of recipients */
     curl_slist_free_all(recipients);
@@ -160,5 +160,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 60722a56883b215847ff9dddf563388637bccb04..9b201240dcdc2ca266817bc5b88d0bc3860bf9eb 100644 (file)
@@ -42,9 +42,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -61,12 +61,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPN");
 
     /* Perform the custom request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Free the list of recipients */
     curl_slist_free_all(recipients);
index 8ed91f55b7224baac06e1ea7f2cc18c717c8f40e..0a3e73d39f9d677b39390327f6f5ee48aa96a5d0 100644 (file)
@@ -89,9 +89,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -125,12 +125,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
 
     /* Send the message */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Free the list of recipients */
     curl_slist_free_all(recipients);
@@ -148,5 +148,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 89bfebd39da43a4897e10dc05b2236cc36766832..7aa610789a042fe143406aef4e751515bb3142e7 100644 (file)
@@ -70,9 +70,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -140,12 +140,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
 
     /* Send the message */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Free lists. */
     curl_slist_free_all(recipients);
@@ -167,5 +167,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index d623f1edcd2f52418d47c5871218cec3b7227d2b..0ce691115225cde11da260f317b45d61cbbc2c3d 100644 (file)
@@ -82,9 +82,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
index 3a5e3304394e2b3a28e86ee85a670d1ac422462d..acc559562f814693b29cbe222ebcdc4eda529dd9 100644 (file)
@@ -86,9 +86,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -152,12 +152,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
     /* Send the message */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Free the list of recipients */
     curl_slist_free_all(recipients);
@@ -168,5 +168,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index e9221b36c9f2bef13cbd78a0c6698929db0952b3..3b622859caedf0844a454fbb962c10eb2d3b734c 100644 (file)
@@ -86,9 +86,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -155,12 +155,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
     /* Send the message */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Free the list of recipients */
     curl_slist_free_all(recipients);
@@ -171,5 +171,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index e58ed9491d7b87eb9a83bd6826a739d01755299c..4d5a8ad60135a74c2688f43b758f51f5aa36c592 100644 (file)
@@ -45,9 +45,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -61,12 +61,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
 
     /* Perform the VRFY */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* Free the list of recipients */
     curl_slist_free_all(recipients);
@@ -82,5 +82,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 1e31f7c15849025a99b8a84077c8add7a278733a..6209ebc314de51420c9137c72f1d4800f35e6861 100644 (file)
@@ -189,7 +189,7 @@ static CURLcode SyncTime_CURL_Fetch(CURL *curl, const char *URL_Str,
                                     const char *OutFileName, int HttpGetBody)
 {
   FILE *outfile;
-  CURLcode res;
+  CURLcode result;
 
   outfile = NULL;
   if(HttpGetBody == HTTP_COMMAND_HEAD)
@@ -200,10 +200,10 @@ static CURLcode SyncTime_CURL_Fetch(CURL *curl, const char *URL_Str,
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, URL_Str);
-  res = curl_easy_perform(curl);
+  result = curl_easy_perform(curl);
   if(outfile)
     fclose(outfile);
-  return res; /* CURLE_OK */
+  return result; /* CURLE_OK */
 }
 
 static void showUsage(void)
@@ -228,7 +228,7 @@ static void showUsage(void)
 
 int main(int argc, char *argv[])
 {
-  CURLcode res;
+  CURLcode result;
   CURL *curl;
   struct conf conf;
   int RetValue;
@@ -274,9 +274,9 @@ int main(int argc, char *argv[])
              "https://www.ntp.org/");
 
   /* Init CURL before usage */
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
index bb642212242b6518ff9e0820b25ceceb7ed206e7..9eeffa78f6de3ad359f1b2bf653e18c9e9096ca1 100644 (file)
@@ -81,15 +81,15 @@ static void *pull_one_url(void *p)
 
 int main(void)
 {
-  CURLcode res;
+  CURLcode result;
   pthread_t tid[NUMT];
   struct targ targs[NUMT];
   int i;
 
   /* Must initialize libcurl before any threads are started */
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   for(i = 0; i < NUMT; i++) {
     int error;
index 738ffc2c972f6e81f17bcdf6f19e916f5102d873..4a1a2937d6cee460b872e76442077cc9ee25c858 100644 (file)
@@ -42,9 +42,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -56,16 +56,16 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_UNIX_SOCKET_PATH, PATH);
 #endif
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index b4cbe1c7eb22c5f92cb891a9c6b9a17ea560fbdc..0c9c5880f78c1cbda4e3472290eba5cf2d4ea639 100644 (file)
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
 {
   static const char *pagefilename = "page.out";
 
-  CURLcode res;
+  CURLcode result;
   CURL *curl;
 
   if(argc < 2) {
@@ -54,10 +54,10 @@ int main(int argc, char *argv[])
     return 1;
   }
 
-  res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res) {
+  result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result) {
     fprintf(stderr, "Could not init curl\n");
-    return (int)res;
+    return (int)result;
   }
 
   /* init the curl session */
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
       curl_easy_setopt(curl, CURLOPT_WRITEDATA, pagefile);
 
       /* get it! */
-      res = curl_easy_perform(curl);
+      result = curl_easy_perform(curl);
 
       /* close the header file */
       fclose(pagefile);
@@ -97,5 +97,5 @@ int main(int argc, char *argv[])
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index 7afc759fa1e4a4998e83afaa426bd7a47ef89d1b..4d6c6444bd1d74a95617614e8b3824f9485fe058 100644 (file)
@@ -38,9 +38,9 @@ int main(void)
   CURLU *urlp;
   CURLUcode uc;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* init curl URL */
   urlp = curl_url();
@@ -62,16 +62,16 @@ int main(void)
     /* only allow HTTP, TFTP and SFTP */
     curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, "http,tftp,sftp");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
   }
 
 cleanup:
   curl_url_cleanup(urlp);
   curl_easy_cleanup(curl);
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 44a0a15bc7b105c134d6b52bd784e09e4c92e814..8f50e75d6d4b6051f6a1827c9571fd59ed38954d 100644 (file)
@@ -158,9 +158,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -183,8 +183,8 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, "PEM");
 
     /* first try: retrieve page without user certificate and key -> fails */
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK)
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK)
       printf("*** transfer succeeded ***\n");
     else
       printf("*** transfer failed ***\n");
@@ -194,8 +194,8 @@ int main(void)
      * the necessary "modifications" to the SSL CONTEXT just before link init
      */
     curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK)
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK)
       printf("*** transfer succeeded ***\n");
     else
       printf("*** transfer failed ***\n");
@@ -203,5 +203,5 @@ int main(void)
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 63d07c784146f556a4c1419303c33bb76d06732c..defde4c0fe484c7b9e1cd59918b3e1a74c3b5113 100644 (file)
@@ -45,9 +45,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -57,16 +57,16 @@ int main(void)
     /* pass the easy handle to the callback */
     curl_easy_setopt(curl, CURLOPT_WRITEDATA, curl);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index a40bddf9cfb18640f94d96f784fb16374b319485..8cbb938e9dbee05ee16e6ea88d23da7069e65336 100644 (file)
@@ -60,14 +60,15 @@ static size_t read_cb(char *buf, size_t nitems, size_t buflen, void *p)
   struct read_ctx *ctx = p;
   size_t len = nitems * buflen;
   size_t left = ctx->blen - ctx->nsent;
-  CURLcode res;
+  CURLcode result;
 
   if(!ctx->nsent) {
-    /* On first call, set the FRAME information to be used (it defaults
-     * to CURLWS_BINARY otherwise). */
-    res = curl_ws_start_frame(ctx->curl, CURLWS_TEXT, (curl_off_t)ctx->blen);
-    if(res) {
-      fprintf(stderr, "error starting frame: %d\n", res);
+    /* On first call, set the FRAME information to be used (it defaults to
+     * CURLWS_BINARY otherwise). */
+    result = curl_ws_start_frame(ctx->curl, CURLWS_TEXT,
+                                 (curl_off_t)ctx->blen);
+    if(result) {
+      fprintf(stderr, "error starting frame: %d\n", result);
       return CURL_READFUNC_ABORT;
     }
   }
@@ -88,9 +89,9 @@ int main(int argc, const char *argv[])
   struct read_ctx rctx;
   const char *payload = "Hello, friend!";
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   memset(&rctx, 0, sizeof(rctx));
 
@@ -111,16 +112,16 @@ int main(int argc, const char *argv[])
     curl_easy_setopt(curl, CURLOPT_READDATA, &rctx);
     curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 0075f68e6059617a732f1c14564ece049c51702e..2fa53028a841d09063bdaa857450fd646627e0c3 100644 (file)
 
 static CURLcode ping(CURL *curl, const char *send_payload)
 {
-  CURLcode res = CURLE_OK;
+  CURLcode result = CURLE_OK;
   const char *buf = send_payload;
   size_t sent, blen = strlen(send_payload);
 
   while(blen) {
-    res = curl_ws_send(curl, buf, blen, &sent, 0, CURLWS_PING);
-    if(!res) {
+    result = curl_ws_send(curl, buf, blen, &sent, 0, CURLWS_PING);
+    if(!result) {
       buf += sent; /* deduct what was sent */
       blen -= sent;
     }
-    else if(res == CURLE_AGAIN) { /* blocked on sending */
+    else if(result == CURLE_AGAIN) { /* blocked on sending */
       fprintf(stderr, "ws: sent PING blocked, waiting a second\n");
       sleep(1); /* either select() on socket or max timeout would
                    be good here. */
@@ -57,9 +57,9 @@ static CURLcode ping(CURL *curl, const char *send_payload)
     else /* real error sending */
       break;
   }
-  if(!res)
+  if(!result)
     fprintf(stderr, "ws: sent PING with payload\n");
-  return res;
+  return result;
 }
 
 static CURLcode recv_pong(CURL *curl, const char *expected_payload)
@@ -67,11 +67,11 @@ static CURLcode recv_pong(CURL *curl, const char *expected_payload)
   size_t rlen = 0;
   const struct curl_ws_frame *meta;
   char buffer[256];
-  CURLcode res;
+  CURLcode result;
 
 retry:
-  res = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
-  if(!res) {
+  result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
+  if(!result) {
     /* on small PING content, this example assumes the complete
      * PONG content arrives in one go. Larger frames will arrive
      * in chunks, however. */
@@ -98,16 +98,16 @@ retry:
       goto retry;
     }
   }
-  else if(res == CURLE_AGAIN) { /* blocked on receiving */
+  else if(result == CURLE_AGAIN) { /* blocked on receiving */
     fprintf(stderr, "ws: PONG not there yet, waiting a second\n");
     sleep(1); /* either select() on socket or max timeout would
                  be good here. */
     goto retry;
   }
-  if(res)
+  if(result)
     fprintf(stderr, "ws: curl_ws_recv returned %u, received %u\n",
-            (unsigned int)res, (unsigned int)rlen);
-  return res;
+            (unsigned int)result, (unsigned int)rlen);
+  return result;
 }
 
 /* close the connection */
@@ -119,28 +119,28 @@ static void websocket_close(CURL *curl)
 
 static CURLcode websocket(CURL *curl)
 {
-  CURLcode res;
+  CURLcode result;
   int i = 0;
   do {
-    res = ping(curl, "foobar");
-    if(res)
+    result = ping(curl, "foobar");
+    if(result)
       break;
-    res = recv_pong(curl, "foobar");
-    if(res)
+    result = recv_pong(curl, "foobar");
+    if(result)
       break;
     sleep(1);
   } while(i++ < 10);
   websocket_close(curl);
-  return res;
+  return result;
 }
 
 int main(int argc, const char *argv[])
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -151,20 +151,20 @@ int main(int argc, const char *argv[])
 
     curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */
 
-    /* Perform the request, res gets the return code */
-    res = curl_easy_perform(curl);
+    /* Perform the request, result gets the return code */
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
     else {
       /* connected and ready */
-      res = websocket(curl);
+      result = websocket(curl);
     }
 
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
index 5b35d048619aea930195a18a56ec653f93d6022b..9122c491dc58a6d97b2e3a5596598c133addce2c 100644 (file)
@@ -118,9 +118,9 @@ int main(void)
 {
   CURL *curl;
 
-  CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
-  if(res)
-    return (int)res;
+  CURLcode result = curl_global_init(CURL_GLOBAL_ALL);
+  if(result)
+    return (int)result;
 
   /* Initialize a libcurl handle. */
   curl = curl_easy_init();
@@ -146,13 +146,13 @@ int main(void)
     printf("Depth   Characters   Closing Tag\n");
 
     /* Perform the request and any follow-up parsing. */
-    res = curl_easy_perform(curl);
-    if(res != CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result != CURLE_OK) {
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
     }
     else if(state.ok) {
-      /* Expat requires one final call to finalize parsing. */
+      /* Expat requiresult one final call to finalize parsing. */
       if(XML_Parse(parser, NULL, 0, 1) == 0) {
         enum XML_Error error_code = XML_GetErrorCode(parser);
         fprintf(stderr, "Finalizing parsing failed with error code %d (%s).\n",
@@ -173,5 +173,5 @@ int main(void)
 
   curl_global_cleanup();
 
-  return (int)res;
+  return (int)result;
 }
index fc653e3a56d783fdedb7cdb912e8127cc9b45e2b..ee722ca84d9cfe9c3e4f6be701d1ff3382a7fc82 100644 (file)
@@ -62,11 +62,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res)
-      printf("error: %s\n", curl_easy_strerror(res));
+    result = curl_easy_perform(curl);
+    if(result)
+      printf("error: %s\n", curl_easy_strerror(result));
     curl_easy_cleanup(curl);
   }
 }
index 45e738f301bfc28bbda01d48b409e7aba158fed8..5ea9c4fba0182f3a77d9eaabb7bbb475f703dd88 100644 (file)
@@ -56,11 +56,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     CURL *nother;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     nother = curl_easy_duphandle(curl);
-    res = curl_easy_perform(nother);
+    result = curl_easy_perform(nother);
     curl_easy_cleanup(nother);
     curl_easy_cleanup(curl);
   }
index e05beb614e089813e153a706910f5d613fd9d113..a7665f46ad60ab42681002af1434dfd150b1e11b 100644 (file)
@@ -413,16 +413,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(CURLE_OK == res) {
+    if(CURLE_OK == result) {
       char *ct;
       /* ask for the content-type */
-      res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
+      result = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
 
-      if((CURLE_OK == res) && ct)
+      if((CURLE_OK == result) && ct)
         printf("We received Content-Type: %s\n", ct);
     }
 
index 909f3c7ac75a60d240c63569d99befb458cd9b72..34dbc640b9f13181b10d84bd552688d983f13faa 100644 (file)
@@ -60,9 +60,9 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 3d19669a5313a6113bef3555d953ffdb84ff13e8..cc61232f875c2e359b9dce9892869b6677e2b358 100644 (file)
@@ -68,9 +68,9 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index e89c03592bf88b900f03c39b97357d39d7e1256b..aeb16c0ce5354b19396a76ecfbf59d59bdcb496a 100644 (file)
@@ -67,22 +67,22 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     /* Do not do the transfer - only connect to host */
     curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(res == CURLE_OK) {
+    if(result == CURLE_OK) {
       char buf[256];
       size_t nread;
       curl_socket_t sockfd;
 
       /* Extract the socket from the curl handle - we need it for waiting. */
-      res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+      result = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
 
       /* read data */
-      res = curl_easy_recv(curl, buf, sizeof(buf), &nread);
+      result = curl_easy_recv(curl, buf, sizeof(buf), &nread);
     }
   }
 }
index 885b37f1bcf6b704c85913cf5e6080ef4cbe4dac..016a6756a848d689ea1371ae2f413430b8a106fe 100644 (file)
@@ -62,20 +62,20 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     /* Do not do the transfer - only connect to host */
     curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(res == CURLE_OK) {
+    if(result == CURLE_OK) {
       curl_socket_t sockfd;
       size_t sent;
       /* Extract the socket from the curl handle - we need it for waiting. */
-      res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+      result = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
 
       /* send data */
-      res = curl_easy_send(curl, "hello", 5, &sent);
+      result = curl_easy_send(curl, "hello", 5, &sent);
     }
   }
 }
index 49c57fb11f783db03921ab91df501c072c5000c6..771442b18504a53a7ded247b5b4dc305e01a97e3 100644 (file)
@@ -1356,9 +1356,9 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 32f2fff240b13385acd83f7b74b2e78991febdd8..b4960be1d148b0d6e6780d9a70ad7b237770386c 100644 (file)
@@ -139,7 +139,7 @@ int main(void)
 {
   CURLSHcode sh;
   CURLSH *share = curl_share_init();
-  CURLcode rc;
+  CURLcode result;
   CURL *curl;
 
   sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
@@ -156,7 +156,7 @@ int main(void)
     curl_easy_perform(curl);
 
     /* export the TLS sessions collected in the share */
-    rc = curl_easy_ssls_export(curl, my_export_cb, NULL);
+    result = curl_easy_ssls_export(curl, my_export_cb, NULL);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index f512c2fe694c6d8123a413a9aa0ce82ae3cf830e..178c10654c73fec0836f532b4bbb5d7d6dd75b4f 100644 (file)
@@ -53,7 +53,7 @@ int main(void)
 {
   CURLSHcode sh;
   CURLSH *share = curl_share_init();
-  CURLcode rc;
+  CURLcode result;
   CURL *curl;
 
   sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
@@ -68,7 +68,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_SHARE, share);
 
     /* read shmac and sdata from storage */
-    rc = curl_easy_ssls_import(curl, NULL, shmac, hlen, sdata, slen);
+    result = curl_easy_ssls_import(curl, NULL, shmac, hlen, sdata, slen);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index 37040a1c1e7a4e3526371436b584aebbe1c56ba6..bec2bdc1a32c02554be5425c8b68a24ec3c23215 100644 (file)
@@ -43,14 +43,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     /* set options */
     /* Perform the entire transfer */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
   }
 }
 ~~~
index 8c5cd55a4c3729c9a44906684556cbcc91d038ae..2669256174eb1f9c9a21878adb480929249b5446 100644 (file)
@@ -74,7 +74,7 @@ int main(void)
 {
   char buffer[256];
   size_t offset = 0;
-  CURLcode res = CURLE_OK;
+  CURLcode result = CURLE_OK;
   CURL *curl = curl_easy_init();
 
   curl_easy_setopt(curl, CURLOPT_URL, "wss://example.com/");
@@ -82,30 +82,32 @@ int main(void)
   /* start HTTPS connection and upgrade to WSS, then return control */
   curl_easy_perform(curl);
 
-  /* Note: This example neglects fragmented messages. (CURLWS_CONT bit)
-           A real application must handle them appropriately. */
+  /* Note: This example neglects fragmented messages.
+     (CURLWS_CONT bit) A real application must handle them
+     appropriately. */
 
-  while(!res) {
+  while(!result) {
     size_t recv;
     const struct curl_ws_frame *meta;
-    res = curl_ws_recv(curl, buffer + offset, sizeof(buffer) - offset, &recv,
-                       &meta);
+    result = curl_ws_recv(curl, buffer + offset,
+                          sizeof(buffer) - offset, &recv,
+                          &meta);
     offset += recv;
 
-    if(res == CURLE_OK) {
+    if(result == CURLE_OK) {
       if(meta->bytesleft == 0)
         break; /* finished receiving */
       if(meta->bytesleft > sizeof(buffer) - offset)
-        res = CURLE_TOO_LARGE;
+        result = CURLE_TOO_LARGE;
     }
 
-    if(res == CURLE_AGAIN)
+    if(result == CURLE_AGAIN)
       /* in real application: wait for socket here, e.g. using select() */
-      res = CURLE_OK;
+      result = CURLE_OK;
   }
 
   curl_easy_cleanup(curl);
-  return (int)res;
+  return (int)result;
 }
 ~~~
 
index ac8f020321263892634b89caf8726501cbb67bbb..dc6e927ca84834011c4380c0ed5c7500b0110990 100644 (file)
@@ -88,7 +88,7 @@ int main(void)
 {
   const char *buffer = "PAYLOAD";
   size_t offset = 0;
-  CURLcode res = CURLE_OK;
+  CURLcode result = CURLE_OK;
   CURL *curl = curl_easy_init();
 
   curl_easy_setopt(curl, CURLOPT_URL, "wss://example.com/");
@@ -96,24 +96,25 @@ int main(void)
   /* start HTTPS connection and upgrade to WSS, then return control */
   curl_easy_perform(curl);
 
-  while(!res) {
+  while(!result) {
     size_t sent;
-    res = curl_ws_send(curl, buffer + offset, strlen(buffer) - offset, &sent,
-                       0, CURLWS_TEXT);
+    result = curl_ws_send(curl, buffer + offset,
+                          strlen(buffer) - offset, &sent,
+                          0, CURLWS_TEXT);
     offset += sent;
 
-    if(res == CURLE_OK) {
+    if(result == CURLE_OK) {
       if(offset == strlen(buffer))
         break; /* finished sending */
     }
 
-    if(res == CURLE_AGAIN)
+    if(result == CURLE_AGAIN)
       /* in real application: wait for socket here, e.g. using select() */
-      res = CURLE_OK;
+      result = CURLE_OK;
   }
 
   curl_easy_cleanup(curl);
-  return (int)res;
+  return (int)result;
 }
 ~~~
 
index 166c5cb7e054746956fd6b906215eb5ca6373600..84b8065d93c743581d0e462496aabc211d2fef36 100644 (file)
@@ -102,7 +102,7 @@ int main(void)
 {
   CURL *easy;
   struct read_ctx rctx;
-  CURLcode res;
+  CURLcode result;
 
   easy = curl_easy_init();
   if(!easy)
@@ -118,12 +118,12 @@ int main(void)
   curl_easy_setopt(easy, CURLOPT_READDATA, &rctx);
   curl_easy_setopt(easy, CURLOPT_UPLOAD, 1L);
 
-  /* Perform the request, res gets the return code */
-  res = curl_easy_perform(easy);
+  /* Perform the request, result gets the return code */
+  result = curl_easy_perform(easy);
   /* Check for errors */
-  if(res != CURLE_OK)
+  if(result != CURLE_OK)
     fprintf(stderr, "curl_easy_perform() failed: %s\n",
-            curl_easy_strerror(res));
+            curl_easy_strerror(result));
 
   /* always cleanup */
   curl_easy_cleanup(easy);
index a9db2926b2397e9e046aed09c2a8f4c182453c6f..9dbf4f857339d18add719e958852f4648eb2676f 100644 (file)
@@ -50,22 +50,22 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_socket_t sockfd;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Do not do the transfer - only connect to host */
     curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
-    res = curl_easy_perform(curl);
-    if(res != CURLE_OK) {
-      printf("Error: %s\n", curl_easy_strerror(res));
+    result = curl_easy_perform(curl);
+    if(result != CURLE_OK) {
+      printf("Error: %s\n", curl_easy_strerror(result));
       curl_easy_cleanup(curl);
       return 1;
     }
 
     /* Extract the socket from the curl handle */
-    res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
-    if(!res && sockfd != CURL_SOCKET_BAD) {
+    result = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+    if(!result && sockfd != CURL_SOCKET_BAD) {
       /* operate on sockfd */
     }
 
index e86cd34cc587cc83fa5209571070df8ad299d8cf..a11c633dddf80826f3372d8d8fe95ed5f7ce99fd 100644 (file)
@@ -47,13 +47,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     double connect;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME, &connect);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME, &connect);
+      if(CURLE_OK == result) {
         printf("Time: %.1f", connect);
       }
     }
index ecaa9dce322c0b643ebe2ab9872b5f8911f299f6..4b57dd83cb8cedc6e6d175a71e1dcc91d1b04dd1 100644 (file)
@@ -47,13 +47,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_off_t connect;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME_T, &connect);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME_T, &connect);
+      if(CURLE_OK == result) {
         printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", connect / 1000000,
                (long)(connect % 1000000));
       }
index d97c311cc8cd1b5b033bc121c95e5055cd43ee60..e24115f98ffcf1b85c735b3d2cacc04152514c75 100644 (file)
@@ -60,7 +60,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
 
     /* connect to any HTTPS site, trusted or not */
@@ -69,14 +69,14 @@ int main(void)
 
     curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       int i;
       struct curl_certinfo *ci;
-      res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
+      result = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
 
-      if(!res) {
+      if(!result) {
         printf("%d certs!\n", ci->num_of_certs);
 
         for(i = 0; i < ci->num_of_certs; i++) {
index 9e7bd173c4e3a7312ee5d4a41cc09cd26f4e59d2..1705967dfe132c8a631b86e9f9acdb7d951f3899 100644 (file)
@@ -46,7 +46,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
@@ -57,13 +57,13 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* check the time condition */
       long unmet;
-      res = curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
+      if(!result) {
         printf("The time condition was %sfulfilled\n", unmet?"NOT":"");
       }
     }
index 4a14a1cd7a227835f384aa536de33be4a2fe9a19..c9caa070ebea44b8339a71c4fc0bf591003e9407 100644 (file)
@@ -43,13 +43,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     double connect;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &connect);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &connect);
+      if(CURLE_OK == result) {
         printf("Time: %.1f", connect);
       }
     }
index 5f0eb1da7a912f04464a6bd1649e3966771e717d..2cfeeb82094a3b32cc531f2c86c496d1975104ea 100644 (file)
@@ -45,13 +45,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_off_t connect;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &connect);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &connect);
+      if(CURLE_OK == result) {
         printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", connect / 1000000,
                (long)(connect % 1000000));
       }
index 95d5258a598bf6e9eb41cd489a58090f11acce40..75e2ccc5eb74cfc791a3506d781c02812f431051 100644 (file)
@@ -44,17 +44,17 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       curl_off_t conn_id;
-      res = curl_easy_getinfo(curl, CURLINFO_CONN_ID, &conn_id);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_CONN_ID, &conn_id);
+      if(!result) {
         printf("Connection used: %" CURL_FORMAT_CURL_OFF_T "\n", conn_id);
       }
     }
index 7b63c95d9df200ab129787e62cfae357a8c3f5fe..1142617c19f0ea1414c35a6744ca557116160603 100644 (file)
@@ -44,17 +44,17 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* check the size */
       double cl;
-      res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl);
+      if(!result) {
         printf("Size: %.0f\n", cl);
       }
     }
index 83a714b53db72bde6b7aa866c08d693f2a1a844a..9bc57e0400538d1c71dd941ceac2ad4521f3fa74 100644 (file)
@@ -41,17 +41,18 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* check the size */
       curl_off_t cl;
-      res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
-      if(!res) {
+      result =
+        curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
+      if(!result) {
         printf("Download size: %" CURL_FORMAT_CURL_OFF_T "\n", cl);
       }
     }
index 6045dcfdbff15d2d4a9c3f4645a19cb5e01da0c9..546325f1792c4b27c25a70f2d3c7885219b105fc 100644 (file)
@@ -43,17 +43,17 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the upload */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* check the size */
       double cl;
-      res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &cl);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &cl);
+      if(!result) {
         printf("Size: %.0f\n", cl);
       }
     }
index 013f0d064ccfe63a4d33db525cc5783f16da9383..6ad40241fe5e7ad5ab838e23e4b9c2bb8c0fdfc3 100644 (file)
@@ -40,17 +40,17 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the upload */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* check the size */
       curl_off_t cl;
-      res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
+      if(!result) {
         printf("Upload size: %" CURL_FORMAT_CURL_OFF_T "\n", cl);
       }
     }
index c019606cc184b31cabcb4f0f27a48f29fce29918..8de0a654612ab0f8008d3410b124a4c1cd27cbe5 100644 (file)
@@ -49,16 +49,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* extract the content-type */
       char *ct = NULL;
-      res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
-      if(!res && ct) {
+      result = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
+      if(!result && ct) {
         printf("Content-Type: %s\n", ct);
       }
     }
index c106864c3ab038e8f98f20db9851494615733815..d3c4a6590e7d70a76435f499618680a7cd02c3c1 100644 (file)
@@ -46,19 +46,19 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* enable the cookie engine */
     curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* extract all known cookies */
       struct curl_slist *cookies = NULL;
-      res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
-      if(!res && cookies) {
+      result = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
+      if(!result && cookies) {
         /* a linked list of cookies in cookie file format */
         struct curl_slist *each = cookies;
         while(each) {
index 5c1323ba1e5a59e2509ceec84cf385e4bf079a34..c2cb4a558ea01f8f85418b8aba62c030a1b1ec2a 100644 (file)
@@ -51,16 +51,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       curl_off_t amount;
-      res = curl_easy_getinfo(curl, CURLINFO_EARLYDATA_SENT_T, &amount);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_EARLYDATA_SENT_T, &amount);
+      if(!result) {
         printf("TLS earlydata: %" CURL_FORMAT_CURL_OFF_T " bytes\n", amount);
       }
     }
index 4538a13342b8759028b781f342368d04a766ff5c..5a1fcdc3e41e08b03721a52dd803ee795951e893 100644 (file)
@@ -48,12 +48,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "data");
     curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       char *method = NULL;
       curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_METHOD, &method);
       if(method)
index 6840583c8461191fe0fe6499b968bb9f23744e00..f7adcd810b63886885fb83eea9265343e3fd084d 100644 (file)
@@ -45,11 +45,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       char *url = NULL;
       curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
       if(url)
index 67bb822e49b5116611c3e89ff649bdf21c37b9eb..48f3f886a50fa590b1e17d28ce8d340516cdc04d 100644 (file)
@@ -50,15 +50,15 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     /* Ask for filetime */
     curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
       long filetime = 0;
-      res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
-      if((CURLE_OK == res) && (filetime != -1)) {
+      result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
+      if((CURLE_OK == result) && (filetime != -1)) {
         time_t file_time = (time_t)filetime;
         printf("filetime: %s", ctime(&file_time));
       }
index 627881c2a472143e029fdfbbc805a90ccaf81cfb..e1f896e3ea250c561cda98dd5f4ed45dfc8567a7 100644 (file)
@@ -51,15 +51,15 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* Ask for filetime */
     curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
       curl_off_t filetime;
-      res = curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime);
-      if((CURLE_OK == res) && (filetime != -1)) {
+      result = curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime);
+      if((CURLE_OK == result) && (filetime != -1)) {
         time_t file_time = (time_t)filetime;
         printf("filetime: %s", ctime(&file_time));
       }
index 8cf7aae9b2bb96362422bef00558616a2529829b..058d273ba04d50685250c70544f6e7a413ea59d9 100644 (file)
@@ -45,16 +45,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* extract the entry path */
       char *ep = NULL;
-      res = curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &ep);
-      if(!res && ep) {
+      result = curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &ep);
+      if(!result && ep) {
         printf("Entry path was: %s\n", ep);
       }
     }
index f54680832056f44136119562e83aa13e8b0a7caf..a537f0408e733c5b7cb22bb0acd5f450274e8d76 100644 (file)
@@ -43,13 +43,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long size;
-      res = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &size);
-      if(!res)
+      result = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &size);
+      if(!result)
         printf("Header size: %ld bytes\n", size);
     }
     curl_easy_cleanup(curl);
index 85b67c8bdab045b965354ffa8be1979277d85de9..8829227c9816ca60b284a910210fb9c760c8c3f8 100644 (file)
@@ -41,16 +41,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* extract the available authentication types */
       long auth;
-      res = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_AVAIL, &auth);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_AVAIL, &auth);
+      if(!result) {
         if(!auth)
           printf("No auth available, perhaps no 401?\n");
         else {
index 5e4727b68d6ca3f869b05d8c803241be452bbd05..031691402b347d94ca428b2b495b69f2f92c3f30 100644 (file)
@@ -42,18 +42,18 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC | CURLAUTH_DIGEST);
     curl_easy_setopt(curl, CURLOPT_USERNAME, "shrek");
     curl_easy_setopt(curl, CURLOPT_PASSWORD, "swamp");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       long auth;
-      res = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_USED, &auth);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_USED, &auth);
+      if(!result) {
         if(!auth)
           printf("No auth used\n");
         else {
index 0a951254883be4e1ac90d46a79a3af1f8a8ebde7..2ded9a121be4527750e50243ba36008a836ed8da 100644 (file)
@@ -40,16 +40,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* typically CONNECT is used to do HTTPS over HTTP proxies */
     curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long code;
-      res = curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE, &code);
-      if(!res && code)
+      result = curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE, &code);
+      if(!result && code)
         printf("The CONNECT response code: %03ld\n", code);
     }
     curl_easy_cleanup(curl);
index bcc274bf6943f838e66918704cfbd5cc621a6f9a..0062a043d895c6a146cf006aa1f4e2d2b3d3d466 100644 (file)
@@ -41,10 +41,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long http_version;
       curl_easy_getinfo(curl, CURLINFO_HTTP_VERSION, &http_version);
     }
index 755cf9a5e0fc0b4459ecfd7e82a58dcfe2919e73..8aa80f9fc5e875935639daff91e78871c2d068df 100644 (file)
@@ -50,22 +50,22 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     long sockfd; /* does not work on win64 */
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Do not do the transfer - only connect to host */
     curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
-    res = curl_easy_perform(curl);
-    if(res != CURLE_OK) {
-      printf("Error: %s\n", curl_easy_strerror(res));
+    result = curl_easy_perform(curl);
+    if(result != CURLE_OK) {
+      printf("Error: %s\n", curl_easy_strerror(result));
       curl_easy_cleanup(curl);
       return 1;
     }
 
     /* Extract the socket from the curl handle */
-    res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
-    if(!res && sockfd != -1) {
+    result = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
+    if(!result && sockfd != -1) {
       /* operate on sockfd */
     }
 
index 1a99f870148cf3555b5cb1caf21bd135ab65cf4b..270b7d5f269ded9927b9ac7a239b452212ff2113 100644 (file)
@@ -47,15 +47,15 @@ the corresponding curl handle.
 int main(void)
 {
   char *ip;
-  CURLcode res;
+  CURLcode result;
   CURL *curl = curl_easy_init();
 
   curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
   /* Perform the transfer */
-  res = curl_easy_perform(curl);
+  result = curl_easy_perform(curl);
   /* Check for errors */
-  if((res == CURLE_OK) &&
+  if((result == CURLE_OK) &&
      !curl_easy_getinfo(curl, CURLINFO_LOCAL_IP, &ip) && ip) {
     printf("Local IP: %s\n", ip);
   }
index 40d1f5fb6a87a002de92db102035355e51bde089..a292f8883fff4ad3722c3023ca8a7dc6b1e29bdf 100644 (file)
@@ -46,18 +46,18 @@ is returned.
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
   curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(CURLE_OK == res) {
+    if(CURLE_OK == result) {
       long port;
-      res = curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT, &port);
+      result = curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT, &port);
 
-      if(CURLE_OK == res) {
+      if(CURLE_OK == result) {
         printf("We used local port: %ld\n", port);
       }
     }
index 427516819a0663068832237b25255da325177f04..c37b36d31df4c2f05ce351c96c08694cde1d5b39 100644 (file)
@@ -44,13 +44,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     double namelookup;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &namelookup);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &namelookup);
+      if(CURLE_OK == result) {
         printf("Time: %.1f", namelookup);
       }
     }
index 418f9f8f324623d8fc0451111c5c631bcced10cf..152abd281f4b7f90d8d5dd17e23bbec194079f11 100644 (file)
@@ -44,13 +44,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_off_t namelookup;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T, &namelookup);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T,
+                                 &namelookup);
+      if(CURLE_OK == result) {
         printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", namelookup / 1000000,
                (long)(namelookup % 1000000));
       }
index 1728a6614be1051dd8437120aaa0d5f14f4f421d..dfac4409790cf9396075c73e5731bdb104621518 100644 (file)
@@ -42,14 +42,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long connects;
-      res = curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &connects);
-      if(!res)
+      result = curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &connects);
+      if(!result)
         printf("It needed %ld connects\n", connects);
     }
     curl_easy_cleanup(curl);
index b12a8ec8a52a0dc6a85cb512aa6b2b89139189be..f163a418191ddfa3a1447e81b0c4ff33437329e8 100644 (file)
@@ -47,13 +47,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res != CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result != CURLE_OK) {
       long error;
-      res = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error);
-      if(!res && error) {
+      result = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error);
+      if(!result && error) {
         printf("Errno: %ld\n", error);
       }
     }
index f2785c0a6f11e567286140fd619793125c90fb97..6819684908b266216ab4d0f8f20ea0a4e2d89433 100644 (file)
@@ -45,14 +45,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
       curl_off_t posttransfer;
-      res = curl_easy_getinfo(curl, CURLINFO_POSTTRANSFER_TIME_T,
+      result = curl_easy_getinfo(curl, CURLINFO_POSTTRANSFER_TIME_T,
                               &posttransfer);
-      if(CURLE_OK == res) {
+      if(CURLE_OK == result) {
         printf("Request sent after: %" CURL_FORMAT_CURL_OFF_T ".%06ld s",
                posttransfer / 1000000, (long)(posttransfer % 1000000));
       }
index ef10c67fa89b8bd6b5f259a19cd6ffbfe095f887..297cf06ca5907ef3ade490e1a08b3f314beee375 100644 (file)
@@ -49,13 +49,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     double pretransfer;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &pretransfer);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME,
+                                 &pretransfer);
+      if(CURLE_OK == result) {
         printf("Time: %.1f", pretransfer);
       }
     }
index 4c5d6d91517ee75fb3eb86349f5b32847d5d209b..43680edcf8f5611c0c2b286c0f57163c1659a59e 100644 (file)
@@ -49,13 +49,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_off_t pretransfer;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME_T, &pretransfer);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME_T,
+                                 &pretransfer);
+      if(CURLE_OK == result) {
         printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld\n",
                pretransfer / 1000000,
                (long)(pretransfer % 1000000));
index 90bd5e400c47770dc5f357c1bfbb4883572e21a1..683d97de16a57456bb0d085ac6cba8864f80cadc 100644 (file)
@@ -47,15 +47,15 @@ the corresponding curl handle.
 int main(void)
 {
   char *ip;
-  CURLcode res;
+  CURLcode result;
   CURL *curl = curl_easy_init();
 
   curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
   /* Perform the transfer */
-  res = curl_easy_perform(curl);
+  result = curl_easy_perform(curl);
   /* Check for errors */
-  if((res == CURLE_OK) &&
+  if((result == CURLE_OK) &&
      !curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ip) && ip) {
     printf("IP: %s\n", ip);
   }
index 85f5767423a48ad1d06a359a4c20910061f6caef..58b8c0d1b44ec2e5d89846f5a91babee0cfec610 100644 (file)
@@ -50,13 +50,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long port;
-      res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT, &port);
-      if(!res)
+      result = curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT, &port);
+      if(!result)
         printf("Connected to remote port: %ld\n", port);
     }
     curl_easy_cleanup(curl);
index b14ece5a1beff204cc02e5bc4087d6ec95dbd8f7..ac4fb82e154c658f2ea3a0ff3a6a9aab968e7a78 100644 (file)
@@ -41,19 +41,19 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     void *pointer = (void *)0x2345454;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     /* set the private pointer */
     curl_easy_setopt(curl, CURLOPT_PRIVATE, pointer);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* extract the private pointer again */
-    res = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &pointer);
+    result = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &pointer);
 
-    if(res)
-      printf("error: %s\n", curl_easy_strerror(res));
+    if(result)
+      printf("error: %s\n", curl_easy_strerror(result));
 
     curl_easy_cleanup(curl);
   }
index f254857ca7dba1827a867e876239ba53a3c534e6..3f9346fa049b6518f270a7120f46eecfa1a56bda 100644 (file)
@@ -53,10 +53,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long scheme;
       curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &scheme);
     }
index fb980f30feca81b26b4cdff756d082bd40f093dc..16161aabee3a1cfab877777f8b3e141b74bf9e26 100644 (file)
@@ -41,17 +41,17 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1:80");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* extract the available proxy authentication types */
       long auth;
-      res = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_AVAIL, &auth);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_AVAIL, &auth);
+      if(!result) {
         if(!auth)
           printf("No proxy auth available, perhaps no 407?\n");
         else {
index eace7222d11a7f51c8d12d9e246857537b03e1cc..e0788c63f21267d9803ce27b45c92156edfe84b8 100644 (file)
@@ -43,7 +43,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy.example");
     curl_easy_setopt(curl, CURLOPT_PROXYAUTH,
@@ -51,12 +51,12 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "shrek");
     curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "swamp");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       long auth;
-      res = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_USED, &auth);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_USED, &auth);
+      if(!result) {
         if(!auth)
           printf("No auth used\n");
         else {
index bb833570c8ee061167d0b400aea210d22d8e8519..0c2dab38fd7b0f2561263d39d5198d6980f4acb1 100644 (file)
@@ -81,15 +81,15 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://127.0.0.1");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_PROXY) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_PROXY) {
       long proxycode;
-      res = curl_easy_getinfo(curl, CURLINFO_PROXY_ERROR, &proxycode);
-      if(!res && proxycode)
+      result = curl_easy_getinfo(curl, CURLINFO_PROXY_ERROR, &proxycode);
+      if(!result && proxycode)
         printf("The detailed proxy error: %ld\n", proxycode);
     }
     curl_easy_cleanup(curl);
index 39fe1c70d2b95fbd824b520e7b6ede8d75d774fa..6164eaeafdeecf24b7f23e63893e17d62dadabab 100644 (file)
@@ -46,22 +46,22 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     long verifyresult;
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
 
-    res = curl_easy_perform(curl);
-    if(res) {
-      printf("error: %s\n", curl_easy_strerror(res));
+    result = curl_easy_perform(curl);
+    if(result) {
+      printf("error: %s\n", curl_easy_strerror(result));
       curl_easy_cleanup(curl);
       return 1;
     }
 
-    res = curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT,
-                            &verifyresult);
-    if(!res) {
+    result = curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT,
+                               &verifyresult);
+    if(!result) {
       printf("The peer verification said %s\n",
              (verifyresult ? "bad" : "fine"));
     }
index acf916413137868fa63bf1728571d9d4f82955f9..d7521c1d5d298780b671a4e90b4c2da0b8406a21 100644 (file)
@@ -45,13 +45,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_off_t queue;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_QUEUE_TIME_T, &queue);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_QUEUE_TIME_T, &queue);
+      if(CURLE_OK == result) {
         printf("Queued: %" CURL_FORMAT_CURL_OFF_T ".%06ld us", queue / 1000000,
                (long)(queue % 1000000));
       }
index 586bf3db053c36ddaf8c36a41cf76b1e5564257d..c4796e4c96371fb20a5b591b0e36b7041331850c 100644 (file)
@@ -41,11 +41,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long redirects;
       curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &redirects);
     }
index 3922b86c79680b0297f91a007edb456a4321330d..01d99f8aeb55a87a2bca723ec98962de864a66b4 100644 (file)
@@ -46,13 +46,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     double redirect;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &redirect);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &redirect);
+      if(CURLE_OK == result) {
         printf("Time: %.1f", redirect);
       }
     }
index a612cf04b6eb0ca1ccd18371623b78818d196579..5b3875f8d7c4b0ca19e168a56cf12cf957080dd9 100644 (file)
@@ -47,13 +47,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_off_t redirect;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME_T, &redirect);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME_T, &redirect);
+      if(CURLE_OK == result) {
         printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", redirect / 1000000,
                (long)(redirect % 1000000));
       }
index 5e33a7115d4a71bcdedd346a282f05769578ee77..32ec6c3355d9c2cb1b8cff50842811c8f9565dff 100644 (file)
@@ -47,10 +47,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       char *url = NULL;
       curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &url);
       if(url)
index 07978f463ff92dd280d719fe5f22c5ddb2fcfc57..6542965fa9489ea993fa600923a667937079d3a3 100644 (file)
@@ -44,11 +44,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_REFERER, "https://example.org/referrer");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       char *hdr = NULL;
       curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
       if(hdr)
index 6f68ce4fce601be5d51c765c4d9d9c28138e6c10..9657f3de601279e1fa2260b30d980def88ea7d0b 100644 (file)
@@ -41,13 +41,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long req;
-      res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req);
-      if(!res)
+      result = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req);
+      if(!result)
         printf("Request size: %ld bytes\n", req);
     }
     curl_easy_cleanup(curl);
index f07fb8d90820f1ed9e972ff0818d5383518aa164..aeb8aeab8a203c1f737b679b146a8b51d7977b19 100644 (file)
@@ -47,10 +47,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long response_code;
       curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
     }
index 0065f3f32dcf1b2999f9d8facbfdc4ed42f336a0..3e36aa3d71ee225095d5ad8e99a9cfeb678ed764 100644 (file)
@@ -54,10 +54,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       curl_off_t wait = 0;
       curl_easy_getinfo(curl, CURLINFO_RETRY_AFTER, &wait);
       if(wait)
index ef699e85535c08b5f42eb0e7188d20ef035b3540..a16b5a1ab6d6e53577f6d9abde7ce60b73d9d66f 100644 (file)
@@ -41,10 +41,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long cseq;
       curl_easy_getinfo(curl, CURLINFO_RTSP_CLIENT_CSEQ, &cseq);
     }
index d4fecaacf6fc72505ba26606c4548b953ccb129b..98cf8a29aa216e2b45014626f0500fa0a99bcbe8 100644 (file)
@@ -41,10 +41,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long cseq;
       curl_easy_getinfo(curl, CURLINFO_RTSP_CSEQ_RECV, &cseq);
     }
index 1a4a2a42731e985bff1a620d06699dbbc5c09fbd..d7fd2131e0bd34e60724ffddc501a3bc155e682f 100644 (file)
@@ -45,10 +45,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       long cseq;
       curl_easy_getinfo(curl, CURLINFO_RTSP_SERVER_CSEQ, &cseq);
     }
index 2fbffbe697b048e26231ce751e753be50a4134e0..4d75ef33e22e89a0707aac7646f685fc563e980b 100644 (file)
@@ -46,10 +46,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       char *id;
       curl_easy_getinfo(curl, CURLINFO_RTSP_SESSION_ID, &id);
     }
index 5d6288e11cb0e75834b3864ad6eb1cd591a59aac..d453e2891d726ec253fcf58673c89842eb69d05e 100644 (file)
@@ -50,10 +50,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       char *scheme = NULL;
       curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme);
       if(scheme)
index 809abd3e770f50fcead93759ac87c9c273d69559..1b04c27ea9336d3ef21c745ee279385b1762e020 100644 (file)
@@ -47,17 +47,17 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* check the size */
       double dl;
-      res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &dl);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &dl);
+      if(!result) {
         printf("Downloaded %.0f bytes\n", dl);
       }
     }
index 102177ae22645311813cd658e7712da5ba20345f..0393c499490840eecceb32359ca0cf44d0b588a5 100644 (file)
@@ -44,17 +44,17 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* check the size */
       curl_off_t dl;
-      res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dl);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dl);
+      if(!result) {
         printf("Downloaded %" CURL_FORMAT_CURL_OFF_T " bytes\n", dl);
       }
     }
index b018e00e2dd339ee7f7d66c8dabf2ecb7bd6c583..6111db4a5788c839eaa36cc1c640a7d32bf6ff30 100644 (file)
@@ -44,16 +44,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       double ul;
-      res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &ul);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &ul);
+      if(!result) {
         printf("Uploaded %.0f bytes\n", ul);
       }
     }
index ec35a0f974c296994dca970833be44611307e170..e75a9809acd1fd2d5c1c51baea8c9478760b8eec 100644 (file)
@@ -41,16 +41,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       curl_off_t ul;
-      res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
+      if(!result) {
         printf("Uploaded %" CURL_FORMAT_CURL_OFF_T " bytes\n", ul);
       }
     }
index 8b3b7b32e7f51f3e0cd20a394fdbf8a7393d82f3..c37155686ad215608bb54ef5877a7de363c10105 100644 (file)
@@ -44,16 +44,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       double speed;
-      res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &speed);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &speed);
+      if(!result) {
         printf("Download speed %.0f bytes/sec\n", speed);
       }
     }
index 50d6d324f99c5bc563f90815ee8fa8e2642a94f4..3c97fbd5c2cee47ea36ea980c5f552a7d5969bba 100644 (file)
@@ -41,16 +41,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       curl_off_t speed;
-      res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
+      if(!result) {
         printf("Download speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\n",
                speed);
       }
index 06778c1e2f342372fff9c20ddd93b07d274ef17d..801fe83f048c38b16e3749eb423c82c52aeb30ab 100644 (file)
@@ -42,16 +42,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       double speed;
-      res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed);
+      if(!result) {
         printf("Upload speed %.0f bytes/sec\n", speed);
       }
     }
index 12b569186ca69dcf7f069efda550ac5df328db85..49e126bb4592a1359b2079b3a51973fb2ca9f621 100644 (file)
@@ -40,16 +40,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       curl_off_t speed;
-      res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
+      if(!result) {
         printf("Upload speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\n", speed);
       }
     }
index 6c4dd46cf666549d579207001ff2a4da44dc49fe..da9582c01c298cb76bb5788ea17dcb319b00e82f 100644 (file)
@@ -46,10 +46,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_slist *engines;
-    res = curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
-    if((res == CURLE_OK) && engines) {
+    result = curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
+    if((result == CURLE_OK) && engines) {
       /* we have a list, free it when done using it */
       curl_slist_free_all(engines);
     }
index c55a63e05e1cceac034b4dbbf05f4c89c2c1c3ae..d4e565b6923bade8445cb7b288652500f6815c24 100644 (file)
@@ -46,21 +46,21 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     long verifyresult;
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
-    res = curl_easy_perform(curl);
-    if(res) {
-      printf("error: %s\n", curl_easy_strerror(res));
+    result = curl_easy_perform(curl);
+    if(result) {
+      printf("error: %s\n", curl_easy_strerror(result));
       curl_easy_cleanup(curl);
       return 1;
     }
 
-    res = curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT,
-                            &verifyresult);
-    if(!res) {
+    result = curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT,
+                               &verifyresult);
+    if(!result) {
       printf("The peer verification said %s\n",
              (verifyresult ? "bad" : "fine"));
     }
index 47fe77673f117ce838c9460bb44d78447cdab2b3..9c5f20ace5045b137514c7b4cbac229b601613e2 100644 (file)
@@ -47,13 +47,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     double start;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &start);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &start);
+      if(CURLE_OK == result) {
         printf("Time: %.1f", start);
       }
     }
index a1d5c5642f3f32417cb038465b89994da882153a..79d91ea8d8143987496d2f09d1406701cdc25e54 100644 (file)
@@ -48,13 +48,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_off_t start;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME_T, &start);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME_T, &start);
+      if(CURLE_OK == result) {
         printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", start / 1000000,
                (long)(start % 1000000));
       }
index 18022ac2c615168acc9afdf286a8980163dee530..f4e24253b7a738bcc7f19c0b2a5331a5c50a303a 100644 (file)
@@ -68,12 +68,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_tlssessioninfo *tls;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(res)
-      printf("error: %s\n", curl_easy_strerror(res));
+    result = curl_easy_perform(curl);
+    if(result)
+      printf("error: %s\n", curl_easy_strerror(result));
     curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &tls);
     curl_easy_cleanup(curl);
   }
index e1c725727ca49ac8b05f0a689b6d9412d8031367..db1a41325bbe50115d6e286ca9d684c4f204a293 100644 (file)
@@ -133,8 +133,8 @@ CURL *curl;
 static size_t wf(void *ptr, size_t size, size_t nmemb, void *stream)
 {
   const struct curl_tlssessioninfo *info = NULL;
-  CURLcode res = curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &info);
-  if(info && !res) {
+  CURLcode result = curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &info);
+  if(info && !result) {
     if(CURLSSLBACKEND_OPENSSL == info->backend) {
       printf("OpenSSL ver. %s\n", SSL_get_version((SSL*)info->internals));
     }
@@ -144,15 +144,15 @@ static size_t wf(void *ptr, size_t size, size_t nmemb, void *stream)
 
 int main(int argc, char **argv)
 {
-  CURLcode res;
+  CURLcode result;
   curl = curl_easy_init();
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wf);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
-  return res;
+  return result;
 }
 ~~~
 
index 60d383a4583846f000d3d8c22c82fc47dc6746af..3cdcee36bbdd05e68f98ebce4214b1eaf8aa3f1b 100644 (file)
@@ -45,13 +45,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     double total;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total);
+      if(CURLE_OK == result) {
         printf("Time: %.1f", total);
       }
     }
index 0302310b6610219ebb06dd6ebb5c20556de4756c..93c876ad335f33ecc940e5e266c2960475666fbc 100644 (file)
@@ -45,13 +45,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_off_t total;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
-      res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &total);
-      if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
+      result = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &total);
+      if(CURLE_OK == result) {
         printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", total / 1000000,
                (long)(total % 1000000));
       }
index 3d652c73b016d5f0c1c9bc495e76d312c2729a86..11f367ffa40cb16aedda529927233c5fe0559d57 100644 (file)
@@ -41,18 +41,18 @@ int main(int argc, char *argv[])
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
     curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1:80");
     curl_easy_setopt(curl, CURLOPT_NOPROXY, "example.com");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       /* extract the available proxy authentication types */
       long used;
-      res = curl_easy_getinfo(curl, CURLINFO_USED_PROXY, &used);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_USED_PROXY, &used);
+      if(!result) {
         printf("The proxy was %sused\n", used ? "" : "NOT ");
       }
     }
index 7de560939917f2550f9c0fe22b5814b35805e7b1..c01ccd272264b1fb452bf0e92e94463341cd5e45 100644 (file)
@@ -45,16 +45,16 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
 
     /* Perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       curl_off_t xfer_id;
-      res = curl_easy_getinfo(curl, CURLINFO_XFER_ID, &xfer_id);
-      if(!res) {
+      result = curl_easy_getinfo(curl, CURLINFO_XFER_ID, &xfer_id);
+      if(!result) {
         printf("Transfer ID: %" CURL_FORMAT_CURL_OFF_T "\n", xfer_id);
       }
     }
index 38fa9542b37f3a42b64cef09fb3ac4c3303c3b1b..e2880478fb8039d8885f6181f848bfd06f40559c 100644 (file)
@@ -43,12 +43,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     long my_scope_id;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     my_scope_id = if_nametoindex("eth0");
     curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, my_scope_id);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 0d4918a4daaaf8d73324515ece9a4c0bb553f626..8bc75d46667ddd5c0badd4717741cc695510582b 100644 (file)
@@ -53,7 +53,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     /* follow redirects */
@@ -62,7 +62,7 @@ int main(void)
     /* set Referer: automatically when following redirects */
     curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 62212e88f7956f03b24ca78d0d13c501f2d74b45..a08cd8be185aa5689a848b9f87ce27ed13ac6d00 100644 (file)
@@ -63,13 +63,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/foo.bin");
 
     /* ask libcurl to allocate a larger receive buffer */
     curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 120000L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index eb0e24f36affbc2ee7fb7ec286eba2b790c3ab90..ffced772b4d85dd2c2f68d10f37cc71c9e097dbc 100644 (file)
@@ -65,14 +65,14 @@ int main(void)
   char *strpem = "PEMDATA"; /* strpem must point to a PEM string */
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_blob blob;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     blob.data = strpem;
     blob.len = strlen(strpem);
     blob.flags = CURL_BLOB_COPY;
     curl_easy_setopt(curl, CURLOPT_CAINFO_BLOB, &blob);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 3dcba2d0a3e80d20913522d972f8c0a208c3dfe9..b82b40fe8ee19f6dbcf38a3f2e16affa9e999a99 100644 (file)
@@ -63,10 +63,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_CAPATH, "/etc/cert-dir");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index baddc3079702f77297306e92e2e33369e8ef707d..e3bf6be8c4a26d675eeb28687ac56836a6c1b45d 100644 (file)
@@ -53,7 +53,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
 
     /* connect to any HTTPS site, trusted or not */
@@ -62,13 +62,13 @@ int main(void)
 
     curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
-    if(!res) {
+    if(!result) {
       struct curl_certinfo *ci;
-      res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
+      result = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
 
-      if(!res) {
+      if(!result) {
         int i;
         printf("%d certs!\n", ci->num_of_certs);
 
index 0515a8ae35ca61634f65d8179beacddbd70ce621..765e0de2323abe75c6370db2c45e0a0dbd38bbdc 100644 (file)
@@ -65,11 +65,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
-    ret = curl_easy_perform(curl);
-    if(ret == CURLE_OK) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_OK) {
       /* only connected */
     }
   }
index a4baf8febf46ecb4483294bbf9bf5f9d95074993..330f3d57d450f417ca4a0ae04b9e3b34a4feb58d 100644 (file)
@@ -78,13 +78,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     /* get cookies from an existing file */
     curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "/tmp/cookies.txt");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 01cf9c01c6fb3d41183f1cd40b99339c247b7b22..ac3a7074d0a27e2b01dc6a21913b6c036c37ac02 100644 (file)
@@ -75,13 +75,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     /* export cookies to this file when closing the handle */
     curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "/tmp/cookies.txt");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* close the handle, write the cookies */
     curl_easy_cleanup(curl);
index bda715af9214a5214ccaea26975f3a5757cbd353..920b4b59fe0b4988a24f578b88c3039d1debb6de 100644 (file)
@@ -51,7 +51,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     /* new "session", do not load session cookies */
@@ -60,7 +60,7 @@ int main(void)
     /* get the (non session) cookies from this file */
     curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "/tmp/cookies.txt");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 275f8bad3cef28a2c56eedd77cfae9e1e917ba1a..4ce1a165c1f4f2dfe16a273558728ac7bd45dcf6 100644 (file)
@@ -45,10 +45,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
     curl_easy_setopt(curl, CURLOPT_CRLF, 1L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 0c4eca6c784f7519ed4c93ecd56e7518868bde43..62f565109090988cd26a58315cc97abe528099b3 100644 (file)
@@ -72,10 +72,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_CRLFILE, "/etc/certs/crl.pem");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 737e746a15928f43da5b0af9830e0e463e5a2b51..f9207b85db482f3001b6a204d0d99a692f14fbee 100644 (file)
@@ -57,13 +57,13 @@ int main(void)
   CURL *curl = curl_easy_init();
   CURLU *urlp = curl_url();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     CURLUcode ret;
     ret = curl_url_set(urlp, CURLUPART_URL, "https://example.com", 0);
 
     curl_easy_setopt(curl, CURLOPT_CURLU, urlp);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_url_cleanup(urlp);
     curl_easy_cleanup(curl);
index 060cfd9c777a6e4e748436ccfb5fbc60187c909b..9928eef9d64ad000d1343d30515a37d0573b1e22 100644 (file)
@@ -119,13 +119,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     /* DELETE the given path */
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index ed84a27d1235528590d2f900b3240f2445b2c584..d15a5576fb536af8068c05d74e7ba0d5cff60f90 100644 (file)
@@ -57,7 +57,7 @@ static int my_trace(CURL *handle, curl_infotype type,
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   struct data my_tracedata;
 
   curl = curl_easy_init();
@@ -70,7 +70,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index 4ecfb5327b0f6a9dcb949add95bac1ff1c8c0538..af1dbd34efc6c1bee5b9ee2203324a9b56cc728d 100644 (file)
@@ -186,7 +186,7 @@ int my_trace(CURL *handle, curl_infotype type,
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
 
   curl = curl_easy_init();
   if(curl) {
@@ -199,11 +199,11 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     /* Check for errors */
-    if(res != CURLE_OK)
+    if(result != CURLE_OK)
       fprintf(stderr, "curl_easy_perform() failed: %s\n",
-              curl_easy_strerror(res));
+              curl_easy_strerror(result));
 
     /* always cleanup */
     curl_easy_cleanup(curl);
index d249fa6223f22c80012239203d22c704b59badf9..548d1f0bf6eea47e582ffcad3276ac4eb1549f89 100644 (file)
@@ -63,13 +63,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/");
 
     /* list only */
     curl_easy_setopt(curl, CURLOPT_DIRLISTONLY, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 4c40980cdb9fd6af3cab3c270c13d65d11b25fce..5a9b7bbb9af88410528c6c415a54e52248b95ab4 100644 (file)
@@ -68,17 +68,17 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     /* only reuse addresses for a short time */
     curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, 2L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* in this second request, the cache is not be used if more than
        two seconds have passed since the previous name resolve */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 015a77c236748a23d466e725c6c4c1ddb7f39818..729223d21b62127c99e7db00710d583b06d40862 100644 (file)
@@ -52,10 +52,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_DNS_INTERFACE, "eth0");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index f149475c4f87ab7cf8423e3385c1a4097c8cecad..4613ff3e1d6fe523a8111a8c4ab10e2714b3a009 100644 (file)
@@ -51,10 +51,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP4, "192.168.0.14");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index a0762b78abeb60b7d5beffdb79e1b0d94596787f..3a0fe9abe3bb412647f35e2c0246cfe895a2967c 100644 (file)
@@ -51,10 +51,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP6, "fe80::a9ff:fe46:b619");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index a731b966ed18be8d3a77ede783e2328918beb40b..738714786ff34a28f4062507b7667325c9e2b5f6 100644 (file)
@@ -55,11 +55,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_DNS_SERVERS,
                      "192.168.1.100:53,192.168.1.101");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 0bc37a6a4e1227981e3e28b31af85aa304f3dacd..05093eb2bdbc0b920ab30f0248c3d3af6f3b2735 100644 (file)
@@ -49,11 +49,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* switch off the use of a global, thread-unsafe, cache */
     curl_easy_setopt(curl, CURLOPT_DNS_USE_GLOBAL_CACHE, 0L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 61bdab4d8af433586e4e20d284ad490519ec6014..6083662aac4804f0cd79c5cd7ffcb6c7418a0f63 100644 (file)
@@ -69,7 +69,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     char errbuf[CURL_ERROR_SIZE];
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
@@ -81,20 +81,20 @@ int main(void)
     errbuf[0] = 0;
 
     /* perform the request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* if the request did not complete correctly, show the error
     information. if no detailed error information was written to errbuf
     show the more generic information from curl_easy_strerror instead.
     */
-    if(res != CURLE_OK) {
+    if(result != CURLE_OK) {
       size_t len = strlen(errbuf);
-      fprintf(stderr, "\nlibcurl: (%d) ", res);
+      fprintf(stderr, "\nlibcurl: (%d) ", result);
       if(len)
         fprintf(stderr, "%s%s", errbuf,
                 ((errbuf[len - 1] != '\n') ? "\n" : ""));
       else
-        fprintf(stderr, "%s\n", curl_easy_strerror(res));
+        fprintf(stderr, "%s\n", curl_easy_strerror(result));
     }
   }
 }
index 24a3bdb7edb38f6a67e194388233925f9a21e088..29578978fc8f7e095883be83e649e86aa6e6910a 100644 (file)
@@ -55,11 +55,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
-    ret = curl_easy_perform(curl);
-    if(ret == CURLE_HTTP_RETURNED_ERROR) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_HTTP_RETURNED_ERROR) {
       /* an HTTP response error problem */
     }
   }
index 65676e13808a9d5263080abae982cc8db0af77f1..6031fcd7605b1c9197091e573b3d2a13f2f64d6b 100644 (file)
@@ -49,15 +49,15 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/path.html");
     /* Ask for filetime */
     curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
-    res = curl_easy_perform(curl);
-    if(CURLE_OK == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OK == result) {
       long filetime;
-      res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
-      if((CURLE_OK == res) && (filetime >= 0)) {
+      result = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
+      if((CURLE_OK == result) && (filetime >= 0)) {
         time_t file_time = (time_t)filetime;
         printf("filetime: %s", ctime(&file_time));
       }
index 59e4419512c5c5050ead3b192f2f9db7ba97629c..3570b91033bf62d46c7ed4523f0e1c8b4b15eddc 100644 (file)
@@ -80,11 +80,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL,
                      "ftp://example.com/old-server/file.txt");
     curl_easy_setopt(curl, CURLOPT_FTPPORT, "-");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index a2021f830e96838b65197fe1e7a9b9efcaad2709..6360fb390869c57c0a73fe173d2e8cfbc9600c4a 100644 (file)
@@ -57,12 +57,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
     curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_TRY);
     /* funny server, ask for SSL before TLS */
     curl_easy_setopt(curl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_SSL);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 3f60368653fe741653a7c07dfa2ba86ea19b356c..97b843696ca350e43cb66a4288669d4b541d72a4 100644 (file)
@@ -49,12 +49,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
 
     curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, "human-resources");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 88824d08fc84cf1a1ad501957b4929912eace8e7..d8ca86427ccde7eadc78022c7d9442f5cf1760b2 100644 (file)
@@ -51,10 +51,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_FTP_ALTERNATIVE_TO_USER, "two users");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index d775e1b8267cf1e4311842cc88bf61d4cd7bcf91..7b1a766d0852215b68503589439ad990e165f33c 100644 (file)
@@ -63,13 +63,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL,
                      "ftp://example.com/non-existing/new.txt");
     curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
                      CURLFTP_CREATE_DIR_RETRY);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 847a491a27b67a1dd67c3b2c53ce585e86faabd5..dffec993d43407ab26f5b28c3aaf939034750505 100644 (file)
@@ -66,11 +66,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/1/2/3/4/new.txt");
     curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, CURLFTPMETHOD_SINGLECWD);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 7116b9536f9f12900eee02522b58c6774dd35412..0f529b25d67aaa7b718b763645a18f52f9ff892b 100644 (file)
@@ -52,12 +52,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
 
     /* please ignore the IP in the PASV response */
     curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index cce1616d41f107a3f8ee9ca2b3771c50d617f07b..78fc976bee7a99af20165f656a173d61a1142478 100644 (file)
@@ -59,12 +59,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
     curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_CONTROL);
     /* go back to clear-text FTP after authenticating */
     curl_easy_setopt(curl, CURLOPT_FTP_SSL_CCC, CURLFTPSSL_CCC_ACTIVE);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 8f2cd82449908c15ca4a18b484f73d1e12e3ffaa..781a2c75de2361975caf4a78025ba602598c370a 100644 (file)
@@ -51,7 +51,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
 
     /* contact us back, aka "active" FTP */
@@ -60,7 +60,7 @@ int main(void)
     /* FTP the way the neanderthals did it */
     curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, 0L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 5bed94573d09086d02b11c43d0a8033c98b6b2db..48eb13641dd51ce59020eb1d7cfdee2b607876fc 100644 (file)
@@ -51,14 +51,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL,
                      "ftp://example.com/old-server/file.txt");
 
     /* let's shut off this modern feature */
     curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 5439f2ca8c585f6310cce4e72ddf764dea111eec..9a26cf45049b722a0e529fe0787c12389518ec42 100644 (file)
@@ -44,14 +44,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL,
                      "ftp://example.com/old-server/file.txt");
 
     /* a drftpd server, do it */
     curl_easy_setopt(curl, CURLOPT_FTP_USE_PRET, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index bedceaabcfb6ae11468d750dc4eccf0db9040d2d..2196f239845746e4b3833b30aae339e648d39aa5 100644 (file)
@@ -47,12 +47,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* delegate if okayed by policy */
     curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION,
                      CURLGSSAPI_DELEGATION_POLICY_FLAG);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 609d891064cb46fa6a18f7f2016ce83a7fd466d6..77ef0e06f33f0677059d815917f33009fd8ad9bc 100644 (file)
@@ -48,10 +48,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_HAPROXYPROTOCOL, 1L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 6250101ee1a0df9e3a5a68238b91c72782e9d602..af42b73b79cd87b04220582b3ef01b674bbfec64 100644 (file)
@@ -53,10 +53,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_HAPROXY_CLIENT_IP, "1.1.1.1");
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 5695d3e0b71a7b7ac93d4981cd64bfdb60c42651..88d8194aba5d8922c642f6f64fa4b1d74901a08a 100644 (file)
@@ -54,7 +54,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     struct curl_slist *list;
     list = curl_slist_append(NULL, "Shoesize: 10");
     list = curl_slist_append(list, "Accept:");
@@ -66,7 +66,7 @@ int main(void)
        libcurl to not send the custom headers to the proxy. Keep them
        separate. */
     curl_easy_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_slist_free_all(list);
     curl_easy_cleanup(curl);
   }
index 5d03607fa17a3d04468b91e65908d46f9fdb81b0..67129f242d4b9e0ecbc9482cc6d00e70c27e6cf0 100644 (file)
@@ -85,7 +85,7 @@ int main(void)
   CURL *curl = curl_easy_init();
   if(curl) {
     struct priv my_stuff;
-    CURLcode res;
+    CURLcode result;
 
     /* set HSTS read callback */
     curl_easy_setopt(curl, CURLOPT_HSTSREADFUNCTION, hsts_cb);
@@ -93,7 +93,7 @@ int main(void)
     /* pass in suitable argument to the callback */
     curl_easy_setopt(curl, CURLOPT_HSTSREADDATA, &my_stuff);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 621268ea52c90db60e7ea441ae93d89659f802db..cdbdbe5d26290d88fc0dd8873e437bb05bc504cb 100644 (file)
@@ -89,7 +89,7 @@ int main(void)
   CURL *curl = curl_easy_init();
   if(curl) {
     struct priv my_stuff;
-    CURLcode res;
+    CURLcode result;
 
     /* set HSTS read callback */
     curl_easy_setopt(curl, CURLOPT_HSTSWRITEFUNCTION, hswr_cb);
@@ -97,7 +97,7 @@ int main(void)
     /* pass in suitable argument to the callback */
     curl_easy_setopt(curl, CURLOPT_HSTSWRITEDATA, &my_stuff);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 585faa275aaef0a66e397d17dcd875af4526b208..400348f4ca3913653bf7df7ae86a781052c7068b 100644 (file)
@@ -45,10 +45,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_HTTP09_ALLOWED, 1L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index b21647eda2aadf166cbb7225e594f51bb38db9b2..f0bdc0f12edb1c7f105665d9b2a67bd697197c8f 100644 (file)
@@ -134,12 +134,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* allow whatever auth the server speaks */
     curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
     curl_easy_setopt(curl, CURLOPT_USERPWD, "james:bond");
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 10ca0c51009f796128375241dc35fe5b03ca3b42..f56e55f18415e880fdc485948fda8fe8b9f14965 100644 (file)
@@ -46,10 +46,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 0L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index ea59ad2c16cb9cf7e81f9c1fa8cc2cc937882d30..15444a2e966bdb6ea3139c224217ecb0b9ea2d8b 100644 (file)
@@ -44,10 +44,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 0L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 4cabb09f8772f8ecdbcd0bafa4e344c37ef56269..1bc23bf7af7afedf6b3ce6150af2a3ad5d29ccdd 100644 (file)
@@ -105,11 +105,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
-    ret = curl_easy_perform(curl);
-    if(ret == CURLE_HTTP_RETURNED_ERROR) {
+    result = curl_easy_perform(curl);
+    if(result == CURLE_HTTP_RETURNED_ERROR) {
       /* an HTTP response error problem */
     }
   }
index d58398383b6043d736da139f82412cd21e32a55c..dc966aad19df3e0227a57c3c639f4aecb4c5cc6d 100644 (file)
@@ -67,12 +67,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     curl_easy_setopt(curl, CURLOPT_INTERFACE, "eth0");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 9d7bee31505b5f1deb406599ed479760412a80c2..180546a9dfcc66e94658695a4cfc6fd2705fc1e1 100644 (file)
@@ -62,13 +62,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     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);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 7b6998040bcbd142bf02ab4fbe8b13a5549545ca..1e10b1bbb29705b6c4a02f5348102f625a1cd06d 100644 (file)
@@ -65,10 +65,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_ISSUERCERT, "/etc/certs/cacert.pem");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index e347f6ca9fa142a27188cccd5dd0a18fec58ac28..c0003536196a7d9876e17807ab55344ed219631d 100644 (file)
@@ -72,14 +72,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_blob blob;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     blob.data = certificateData;
     blob.len = filesize;
     blob.flags = CURL_BLOB_COPY;
     curl_easy_setopt(curl, CURLOPT_ISSUERCERT_BLOB, &blob);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 5b43545e0f13101a2d188ac40e05c99501d02c31..eeb4704dd2825178017ba2492e54427069e497d7 100644 (file)
@@ -51,11 +51,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "sending data");
     curl_easy_setopt(curl, CURLOPT_KEEP_SENDING_ON_ERROR, 1L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 0b7ded9c70c13ea6b608125b3b1c94551688aa73..d97a947164360280d1f77d9f478fee55e443d462 100644 (file)
@@ -55,12 +55,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
     curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "superman");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 8dc5de7cee7ccf6971c9211c555f1f3fa52625d3..cfc728ccd643c02ae26ee05a956cf64e143f7553 100644 (file)
@@ -52,10 +52,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_KRBLEVEL, "private");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index ef71d5373bacdc18e194e02fec82be3a0f48d059..806de6e9ac5614dd1bdb73dbbb89cc1f7664c3b8 100644 (file)
@@ -45,12 +45,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L);
     /* and try 20 more ports following that */
     curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index a3a33ff1088ef4dad025950f897b065b981ad8a0..da3ef5ae1fcd39f6b8916c5c01d1393ca8772cd0 100644 (file)
@@ -48,12 +48,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L);
     /* and try 20 more ports following that */
     curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 9d41a3fa74cc39d39fd599cb7f52562d92128329..dfdda91efd489858c6c78774bbc75b634e304326 100644 (file)
@@ -64,10 +64,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
     curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=*");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 97c2654604f6a20a14d234e9a9729fbdc3bc4d73..06d1533e4aace6cdb24b0bd64a7d438bf3141e0d 100644 (file)
@@ -47,13 +47,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     /* abort if slower than 30 bytes/sec during 60 seconds */
     curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L);
     curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 30L);
-    res = curl_easy_perform(curl);
-    if(CURLE_OPERATION_TIMEDOUT == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OPERATION_TIMEDOUT == result) {
       printf("Timeout.\n");
     }
     /* always cleanup */
index d478e753ce9c607918c9048bf792c96f099eca1f..6a250efb0355ecd8262fe8825738e78a80f36ed4 100644 (file)
@@ -44,13 +44,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     /* abort if slower than 30 bytes/sec during 60 seconds */
     curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L);
     curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 30L);
-    res = curl_easy_perform(curl);
-    if(CURLE_OPERATION_TIMEDOUT == res) {
+    result = curl_easy_perform(curl);
+    if(CURLE_OPERATION_TIMEDOUT == result) {
       printf("Timeout.\n");
     }
     /* always cleanup */
index 8643c892e3645a62d7c9dbedbaec2fcb28ba2a4f..13b9acadae5347547cba82fa32a0a596b0755c1b 100644 (file)
@@ -61,10 +61,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
     curl_easy_setopt(curl, CURLOPT_MAIL_AUTH, "<secret@cave>");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index aa5656e413e334132d13fa201ad0f4bd1d57de68..fe6968f3687a39e3fbcec5d36416a65a80091144 100644 (file)
@@ -57,10 +57,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
     curl_easy_setopt(curl, CURLOPT_MAIL_FROM, "president@example.com");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 99ee600f589ebd4b35231c1f3dfc7f9f68eaa5a8..de763edd07997e3074762ee2f0cd9a823deb8850 100644 (file)
@@ -67,14 +67,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_slist *list;
     list = curl_slist_append(NULL, "root@localhost");
     list = curl_slist_append(list, "person@example.com");
     list = curl_slist_append(list, "<other@example.com> NOTIFY=SUCCESS");
     curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
     curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, list);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_slist_free_all(list);
     curl_easy_cleanup(curl);
   }
index eae7c3f51c7e065c95fd47e07d0dfde9fff6855a..d87ba09bd7bc518fe604f1adf161b25b8374263f 100644 (file)
@@ -55,7 +55,7 @@ int main(void)
   CURL *curl = curl_easy_init();
   if(curl) {
     struct curl_slist *list;
-    CURLcode res;
+    CURLcode result;
 
     /* Adding one valid and one invalid email address */
     list = curl_slist_append(NULL, "person@example.com");
@@ -64,7 +64,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
     curl_easy_setopt(curl, CURLOPT_MAIL_RCPT_ALLOWFAILS, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_slist_free_all(list);
     curl_easy_cleanup(curl);
   }
index 80a4f8b3266ab3cc96bd565f2391ebf975c4d359..96df2614a148f8610f6fb2aec1718789980a4fab 100644 (file)
@@ -58,11 +58,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* limit the connection cache for this handle to no more than 3 */
     curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 3L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 0dd9d7922ab522e80bfb36e9fed8c35a279046f5..8618758f1b4190d5694404ac20b6164639afd0c6 100644 (file)
@@ -54,11 +54,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* refuse to download if larger than 1000 bytes */
     curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, 1000L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index e58b8195e6c806b9021dd618385d6a08fb7e1305..3ee91696e44daeb11d8e3d15a35145754ae9aa78 100644 (file)
@@ -55,12 +55,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_off_t ridiculous = (curl_off_t)1 << 48;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* refuse to download if larger than ridiculous */
     curl_easy_setopt(curl, CURLOPT_MAXFILESIZE_LARGE, ridiculous);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 2ad3d49b96e4469dc2dfb4dbe373e60e03310215..9a9117669d62a982dab5f91fd441adcfa23ca634 100644 (file)
@@ -53,11 +53,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* cap the download speed to 31415 bytes/sec */
     curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t)31415);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 545fec9a0d1ed7d3d13ce84ddb243bce4174a24d..34566ece0ded716c4af44ad9adaacc1f5045646e 100644 (file)
@@ -54,12 +54,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* cap the upload speed to 1000 bytes/sec */
     curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t)1000);
     /* (set some upload options as well) */
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index aba4ed2ad9cb63758c1f89634631918eea7a82af..65d87cf88158d0561ce05f92ea757fc223dd32f1 100644 (file)
@@ -131,10 +131,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
     curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 8863415910f2d46357f116aa45a45b96fc6205e4..dba6f850070c64ce994f68dbe3f9b0b6f02c1393 100644 (file)
@@ -51,11 +51,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
     curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
     curl_easy_setopt(curl, CURLOPT_NETRC_FILE, "/tmp/magic-netrc");
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 7c2c13fd00949e0f649ac122dcb6d3b629e3b59b..cb6731912c72dd44912138ab9e12df9c7782cd7c 100644 (file)
@@ -48,12 +48,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL,
                      "sftp://upload.example.com/newdir/file.zip");
     curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L);
     curl_easy_setopt(curl, CURLOPT_NEW_DIRECTORY_PERMS, 0644L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 7252ac5956b6a777f86869ff7bcdb1c65fec2449..4c9579c8264e0a82d174f4e8c451a8024f3cf5c4 100644 (file)
@@ -46,10 +46,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "sftp://upload.example.com/file.txt");
     curl_easy_setopt(curl, CURLOPT_NEW_FILE_PERMS, 0664L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 27886ff65e75fe50dc3720f69c627bda43d04a93..c89b01465bac0278eb97e2433e657fe47f93783b 100644 (file)
@@ -56,12 +56,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
 
     curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index d91a7da3ba7f91fc0925f879e13032bbb1dd4fd3..2bcdee3b6650782cf77fd41183c47c75ac8dde72 100644 (file)
@@ -63,7 +63,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     extern int sockfd; /* the already connected one */
 
     /* libcurl thinks that you connect to the host
@@ -76,7 +76,7 @@ int main(void)
     /* call this function to set options for the socket */
     curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 89931d0e066c29255fb17d6c5a0daf06ca1c9b0d..35915163589e42cd73f1573636551bc064f24bca 100644 (file)
@@ -111,7 +111,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     extern int sockfd; /* the already connected one */
     /* libcurl thinks that you connect to the host
      * and port that you specify in the URL option. */
@@ -123,7 +123,7 @@ int main(void)
     /* call this function to set options for the socket */
     curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 26bbf32d39e0b6b9812f85cda12152940d694d0a..f8b9ee752d9e5a2f1cd5535b0ca2eb60ffa1d598 100644 (file)
@@ -53,12 +53,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     curl_easy_setopt(curl, CURLOPT_PASSWORD, "qwerty");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index e452cb54f72a816ad865a47e1a978c4b133cc5de..c0cf765dbacffa95013765ca850d6668cc493ba8 100644 (file)
@@ -55,10 +55,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_PORT, 8080L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index c7850f3aed1ea441c35ad5999987fe06f0a49113..1678b50e6bfbc458a3c51ba52cece8b6844d060e 100644 (file)
@@ -81,13 +81,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_POST, 1L);
 
     /* set up the read callback with CURLOPT_READFUNCTION */
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 0457f490db64eca249e7323d1ea2f9750145285b..55ef81aabc029f84001bd2293b9790b3aa404a65 100644 (file)
@@ -56,13 +56,13 @@ int main(void)
 
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
 
     /* pass in the FTP commands to run after the transfer */
     curl_easy_setopt(curl, CURLOPT_POSTQUOTE, cmdlist);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index c570e57731bd1110e3f20fdaf073670996f9c636..79cf9fee80e4182489e1af7c5066096ae035e255 100644 (file)
@@ -57,13 +57,13 @@ int main(void)
 
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
 
     /* pass in the FTP commands to run */
     curl_easy_setopt(curl, CURLOPT_PREQUOTE, cmdlist);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index c010c8fd0ccbf2342a8fd82ba2b592463cc5ff10..459fd429c371bd321475bd0be57ab2ca8164a4e3 100644 (file)
@@ -53,7 +53,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* use this proxy */
     curl_easy_setopt(curl, CURLOPT_PROXY, "http://local.example.com:1080");
@@ -61,7 +61,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
     /* set the proxy credentials */
     curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "james:007");
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 20e3a687a6034cf742075b7c6f1a9af43638e35a..c4664b66311e25d682fa26ccdea19b0916bd7d94 100644 (file)
@@ -53,12 +53,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
     curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith");
     curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 31abbf9cbfb79c06e21584d51dc416d0d8cb318a..6a390ae9030edc81443f2532cffb7312583d6b41 100644 (file)
@@ -54,11 +54,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_PROXY, "localhost");
     curl_easy_setopt(curl, CURLOPT_PROXYPORT, 8080L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index d7870efc571339671d1a23e12b66193a2d53ca24..6000d10b00bceaa73d08504963b0c419b5b3e736 100644 (file)
@@ -81,12 +81,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "local.example.com:1080");
     /* set the proxy type */
     curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 0bf170f4e899777ad835abbe9ca4396a505bd80a..be196eed1336b2b17a75a5baee8bbccd07769142 100644 (file)
@@ -53,12 +53,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
     curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith");
     curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 3fed4a3d55574f8a6310c4740606f2dd3c06a299..87dac82a13f236e0b97436a150bcd9a9cf96c8dc 100644 (file)
@@ -55,11 +55,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080");
     curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "clark%20kent:superman");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 55c97b769f7ed196d3b3d27b831a857320ef4d80..3eb5af912ac2803c60c2cdd2a751d0d4090cf16d 100644 (file)
@@ -69,12 +69,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* using an HTTPS proxy */
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
     curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, "/etc/certs/cabundle.pem");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 5efc5e5f089eb194f6a5f5834bd0a10ce0c71613..36666edf212c10004525e67fabc08d9cdc42b112 100644 (file)
@@ -69,7 +69,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_blob blob;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* using an HTTPS proxy */
@@ -78,7 +78,7 @@ int main(void)
     blob.len = strlen(strpem);
     blob.flags = CURL_BLOB_COPY;
     curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO_BLOB, &blob);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 0cb17c31bfaab3fb0b33faaff8c352845856688a..0bd3770f9179fd2b588cb58c914d49be6a18e664 100644 (file)
@@ -61,12 +61,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* using an HTTPS proxy */
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
     curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 76c961251545dac92d4fa64fb06eae4d037dc23a..2dda8235c686cd2250b6a5bf9306391a4c349b53 100644 (file)
@@ -71,11 +71,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:80");
     curl_easy_setopt(curl, CURLOPT_PROXY_CRLFILE, "/etc/certs/crl.pem");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 54e900d2fdb3118c42674b2546e3ae9d832f6c6d..c3687a46fe87cd2461c2fa28207acc459926b639 100644 (file)
@@ -67,12 +67,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* using an HTTPS proxy */
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
     curl_easy_setopt(curl, CURLOPT_PROXY_ISSUERCERT, "/etc/certs/cacert.pem");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index dd8e81b8d40a810e2ad4b723557807f5f742cc96..180a7b1808bf7514faeb1502e643314419e20be2 100644 (file)
@@ -73,7 +73,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_blob blob;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* using an HTTPS proxy */
@@ -82,7 +82,7 @@ int main(void)
     blob.len = filesize;
     blob.flags = CURL_BLOB_COPY;
     curl_easy_setopt(curl, CURLOPT_PROXY_ISSUERCERT_BLOB, &blob);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 9b59ec1fd1a733e38f2676514748702c6d657b73..98f3683eef2ba3d4e00bcdde325ab57c1dc7ca8f 100644 (file)
@@ -59,11 +59,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example:443");
     curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "superman");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 59cd1aaea204e4facbac54993363b5139a134872..9bdb4af26aa3ab6a21fb333502ff4a73428c2166 100644 (file)
@@ -51,10 +51,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY_SERVICE_NAME, "custom");
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index efea446a25e5c57c023c59a1c50126a79782fb92..8ba84add1fb0eccaaf1cfc6450715d284eb9506f 100644 (file)
@@ -62,13 +62,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index e0c07e325d0b672a616d7bc0d38b5c145b34b18f..c7c7b728a583aa235b7878f1655f9d9ece1acfc8 100644 (file)
@@ -58,14 +58,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERTTYPE, "PEM");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 83bd4d6ea814b9250be6bc117b48efa42033cee2..5be7b134a0c05f5ad0234373a17cd9dd0b9a0375 100644 (file)
@@ -62,7 +62,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_blob blob;
     blob.data = certificateData;
     blob.len = filesize;
@@ -72,7 +72,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT_BLOB, &blob);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 443097dfb45283dad2731f1615c069d3c5e3ee8f..9b8d29373530e5f7034a6d9a202520ae682c1c63 100644 (file)
@@ -62,13 +62,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index cf44f3718ab9ef8daf7d6b91de076a0a561bebe2..8513dffceda431683792dd9c66f72d7ca31001a5 100644 (file)
@@ -51,14 +51,14 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLCERT, "client.pem");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEYTYPE, "PEM");
     curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index da997695d04b45397104de08aeaebf90c017ea35..65f940b8610cd48904615be96c738403edaed8f0 100644 (file)
@@ -59,7 +59,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_blob blob;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
@@ -73,7 +73,7 @@ int main(void)
     blob.len = privateKeySize;
     curl_easy_setopt(curl, CURLOPT_PROXY_SSLKEY_BLOB, &blob);
     curl_easy_setopt(curl, CURLOPT_PROXY_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 718b2617491cb221c1112961821bd615650624da..ce1f63aa3b97355fd2a70ed3540f574bd3400d04 100644 (file)
@@ -75,13 +75,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost");
     curl_easy_setopt(curl, CURLOPT_PROXY_SSL_CIPHER_LIST,
                      "ECDHE-ECDSA-CHACHA20-POLY1305:"
                      "ECDHE-RSA-CHACHA20-POLY1305");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index ec9ccc16c8c0b9a8bdc73d829c11c7176d6575eb..cbe422b08e92a24643c4b11893e53f2f54bbdeea 100644 (file)
@@ -104,13 +104,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
     /* weaken TLS only for use with silly proxies */
     curl_easy_setopt(curl, CURLOPT_PROXY_SSL_OPTIONS,
                      CURLSSLOPT_ALLOW_BEAST | CURLSSLOPT_NO_REVOKE);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 18b5516c5e651a27eabcf08a66dcf68391661607..999a111c98b9ea5ef18ba53ced2081863e98df86 100644 (file)
@@ -70,11 +70,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLS13_CIPHERS,
                      "TLS_CHACHA20_POLY1305_SHA256");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 540d96149febf80c64f4827c84f856cfa966e019..17acca6761d61ec7900e7851c01b2270215dc43c 100644 (file)
@@ -56,13 +56,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index ceb1c1c09184167ec624ca8956c1a80cd3a1ee87..d1badf4be565f210c0e5bdb533ecb30040080453 100644 (file)
@@ -63,13 +63,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index cbc89527535533e81107df81f8690bcb0b9d2402..c4db7aa81526eb4aa024ccc31b75787f8514808e 100644 (file)
@@ -56,13 +56,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_TYPE, "SRP");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_USERNAME, "user");
     curl_easy_setopt(curl, CURLOPT_PROXY_TLSAUTH_PASSWORD, "secret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index f424a27ef59243d577bef589605a7087c13b7926..93b483802e6655dbb1375b357bc8a2257f48e478 100644 (file)
@@ -48,13 +48,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL,
                      "ftp://example.com/old-server/file.txt");
     curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:80");
     curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 1L);
     curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 7027159e31f9b529c7ca42b351dc8a2d4efa273e..d6505244cb6ac59adf22add04181f3b59c6514b0 100644 (file)
@@ -47,9 +47,9 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L);
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 11b6997c6811c6c29ef91846b9a7f58b22518a81..d4365f7b418551ff627aecc801c2b57f712c9534 100644 (file)
@@ -147,13 +147,13 @@ int main(void)
 
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
 
     /* pass in the FTP commands to run before the transfer */
     curl_easy_setopt(curl, CURLOPT_QUOTE, cmdlist);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index d7b13a04abcb66fff27d7b85a1b4eab11d14234e..27da0f3b8319934eb0c1c1e9f1431e4795a2a923 100644 (file)
@@ -45,10 +45,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
     curl_easy_setopt(curl, CURLOPT_RTSP_CLIENT_CSEQ, 1234L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 89e303d4ab1ad14880973d54a494160f38df8752..e42e75b712f11fbacf4655a70f6cc4dfb75517a4 100644 (file)
@@ -121,11 +121,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
     /* ask for options */
     curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index d054be7a55ec7298972552a34f7b30c2d8612536..f8672f1bf4c8ff793adbc75c4f2481fd58bed327 100644 (file)
@@ -44,10 +44,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
     curl_easy_setopt(curl, CURLOPT_RTSP_SERVER_CSEQ, 1234L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 0d76e60186b0d2f8f77d8c256cdf82431d0b298c..e60438eecb52abd3ddd1fa4b033ea445b7762991 100644 (file)
@@ -52,11 +52,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     char *prev_id = "old"; /* saved from before somehow */
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
     curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, prev_id);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index eb745da04378748ebfacb6b68fe43847c1f7ee23..619096bf1ad77be6df51a8819a8108b178f2f131 100644 (file)
@@ -56,11 +56,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
     curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI,
                      "rtsp://foo.example.com/twister/video");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index cba9b4ad539bbaf8e234bcc36c76a4c2f1a6376d..44633cd71dd8c20f9d2e47a2c0b076e122529b0d 100644 (file)
@@ -48,12 +48,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
     curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
     curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT,
                      "RTP/AVP;unicast;client_port=4588-4589");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 7f627f5a615f7215929dc7599f4d1708cc95c8d4..e32380d65ed3bdf8b7edd3f2912421988ec3c7e3 100644 (file)
@@ -59,12 +59,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "imap://example.com/");
     curl_easy_setopt(curl, CURLOPT_USERNAME, "Kurt");
     curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq");
     curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "Ursel");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 6a3b50ca35da3eeb38ecc1218ce5c9212fd5a6cf..c99239db5b7c071ae009194bd93de5a6331153ad 100644 (file)
@@ -56,10 +56,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
     curl_easy_setopt(curl, CURLOPT_SASL_IR, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 85695316e655b61532492f9e0b1d993393c5f18f..68e27529dc292f8fb8193c4950811552a25b5af5 100644 (file)
@@ -54,11 +54,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/slow.txt");
     /* wait no more than 23 seconds */
     curl_easy_setopt(curl, CURLOPT_SERVER_RESPONSE_TIMEOUT, 23L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 98d93fe5dc95ab905b5290975ac36767dfc657c7..cb57bf5d4a776c1229dca32d9bbaa673f84951d0 100644 (file)
@@ -59,11 +59,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/slow.txt");
     /* wait no more than 237 milliseconds */
     curl_easy_setopt(curl, CURLOPT_SERVER_RESPONSE_TIMEOUT_MS, 237L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 56d7029cd255d0556cf87657815e3f59e81826a5..f6efb393f24e1b74b5333408def6494dca7a024c 100644 (file)
@@ -56,10 +56,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode ret;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SERVICE_NAME, "custom");
-    ret = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
   }
 }
 ~~~
index 9b9a281e00be4959f7d28391a3b42d47bbcbf631..2c6a496593fdc9a04979a695ca129bbf37696aa2 100644 (file)
@@ -57,21 +57,21 @@ int main(void)
   CURL *curl = curl_easy_init();
   CURL *curl2 = curl_easy_init(); /* a second handle */
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     CURLSH *shobject = curl_share_init();
     curl_share_setopt(shobject, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "");
     curl_easy_setopt(curl, CURLOPT_SHARE, shobject);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
 
     /* the second handle shares cookies from the first */
     curl_easy_setopt(curl2, CURLOPT_URL, "https://example.com/second");
     curl_easy_setopt(curl2, CURLOPT_COOKIEFILE, "");
     curl_easy_setopt(curl2, CURLOPT_SHARE, shobject);
-    res = curl_easy_perform(curl2);
+    result = curl_easy_perform(curl2);
     curl_easy_cleanup(curl2);
 
     curl_share_cleanup(shobject);
index dbf75da3bca8ec5b68634844b1bb722ce9d591b0..be913df0296b7b807bb7a80194f0d61d52655ff8 100644 (file)
@@ -51,7 +51,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     int recvbuffersize = 256 * 1024;
 
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
@@ -60,7 +60,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
     curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, &recvbuffersize);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 3467acf77f650c42630a7058705499597578f072..b20a387b120548261e7d1f41962ed2c2f4e8e93c 100644 (file)
@@ -105,7 +105,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     int sockfd; /* our custom file descriptor */
     /* libcurl thinks that you connect to the host
      * and port that you specify in the URL option. */
@@ -117,7 +117,7 @@ int main(void)
     /* call this function to set options for the socket */
     curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index f873c6a5cc35bf390e121f10a09a56f568ecfd30..38f5004adca934153a9a4cf0a31b785725c0a6bb 100644 (file)
@@ -45,11 +45,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://proxy");
     curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_NEC, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index b47c2ca2264be44d5a749beaa7ef9553de8e255a..673112cf3233468afa91d1f368b6fd2ffd3dc070 100644 (file)
@@ -49,11 +49,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://proxy");
     curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_SERVICE, "rcmd-special");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 60a6025c8c4169fa79aa1f53ae89d301989abb0f..3b9fb989d1565d704351626e8f9d3a2e39e26cfa 100644 (file)
@@ -50,11 +50,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
     curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES,
                      CURLSSH_AUTH_PUBLICKEY | CURLSSH_AUTH_KEYBOARD);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 09810f22ee7feaa6adafdd2cfac8484717cba851..5dfb2ff1d247a8ffd1da8295e534e2507f1b53b9 100644 (file)
@@ -56,11 +56,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
     curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
                      "afe17cd62a0f3b61f1ab9cb22ba269a7");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 3e6861bc35d698045ea86ab5a3e20528edd33477..e83bf918d79b5dc8e78d1dd63ce7febcbdf809b5 100644 (file)
@@ -52,11 +52,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
     curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256,
                      "NDVkMTQxMGQ1ODdmMjQ3MjczYjAyOTY5MmRkMjVmNDQ=");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index e4443a10b6f23b55f10c47840304353d6f800f1c..cdd45110afbb83ec3565c0d0de9406097068d44e 100644 (file)
@@ -58,11 +58,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
     curl_easy_setopt(curl, CURLOPT_SSH_KNOWNHOSTS,
                      "/home/clarkkent/.ssh/known_hosts");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index a92f744d59a3ca6a7bd8121f29c4cb9806f312e8..2a1f79845dbf52d7bede0006be3c4aea08379fa2 100644 (file)
@@ -57,12 +57,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
     curl_easy_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE,
                      "/home/clarkkent/.ssh/id_rsa");
     curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "password");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index d7878e8626403e30df1fc04443902f3ad915f04f..d7df84fa1bfc4d6e6d1a2712a5a2e37b40880acb 100644 (file)
@@ -53,11 +53,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
     curl_easy_setopt(curl, CURLOPT_SSH_PUBLIC_KEYFILE,
                      "/home/clarkkent/.ssh/id_rsa.pub");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 40c3a21c25afac3aa3329125acfc84c8f19d78d2..d3669e90a4e408eb074e54f8554baf95a38cf511 100644 (file)
@@ -66,12 +66,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
     curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index acf875dfb5c6018314cdb4ca29f245e263980c3e..849701608384c0fc6a3eb2688faf343b4ff0d137 100644 (file)
@@ -58,13 +58,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
     curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "PEM");
     curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 5d121de2dec42f409fc7445cb473f5837544f4d1..aa69fbbc896a0b68e37559caff6c2f200ea34bfd 100644 (file)
@@ -62,7 +62,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_blob stblob;
     stblob.data = certificateData;
     stblob.len = filesize;
@@ -71,7 +71,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_SSLCERT_BLOB, &stblob);
     curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "P12");
     curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 0983e93a51df2b1efa9e98dc1addcef894bb83a8..85aa7753ec58879d905c80bb9995ae60c7874638 100644 (file)
@@ -56,10 +56,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 72e908b76eabea79d4c3b639e3be243af9ae1ca2..87aab0c2bb3f4bd4e6a1694ab90582a0f3125a7e 100644 (file)
@@ -46,11 +46,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSLENGINE, "dynamic");
     curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index bbc486d21fb3a237202d93ba61914b94c7a0ffba..f590e16e9ed28074b5f69b680ec7a33a778a3d36 100644 (file)
@@ -60,12 +60,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
     curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 0a996fc054681f751898fdd15916e8c4aa5da78c..aef7fd5f8d507c8ba61c7b5770f7704d510197bf 100644 (file)
@@ -63,13 +63,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
     curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
     curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, "PEM");
     curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 515fa91b38941f62aabc575cb6c491122e2ccb09..a062d39deba80d23ff1a308f0546f8dd9a5b4803 100644 (file)
@@ -61,7 +61,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_blob blob;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     blob.data = certificateData;
@@ -75,7 +75,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_SSLKEY_BLOB, &blob);
     curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
     curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, "PEM");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index a177d5231722bdc53515ca1b51a89b5051ee1a4a..1bbbf6e8c5273a82c7e27d745a9a1fb12f076cb1 100644 (file)
@@ -80,12 +80,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSL_CIPHER_LIST,
                      "ECDHE-ECDSA-CHACHA20-POLY1305:"
                      "ECDHE-RSA-CHACHA20-POLY1305");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 7cc94bdfb9da6b46f6e804147136e3eac2fa1835..d8fac3b2e251d8d1600bce33badb7eb11c4d20a3 100644 (file)
@@ -82,7 +82,7 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   /* CA cert in PEM format, replace the XXXs */
   char *mypem =
     "-----BEGIN CERTIFICATE-----\n"
@@ -103,15 +103,15 @@ int main(void)
 
   curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
   curl_easy_setopt(curl, CURLOPT_SSL_CTX_DATA, mypem);
-  res = curl_easy_perform(curl);
-  if(!res)
+  result = curl_easy_perform(curl);
+  if(!result)
     printf("*** transfer succeeded ***\n");
   else
     printf("*** transfer failed ***\n");
 
   curl_easy_cleanup(curl);
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
 ~~~
 
index 01688ef3ea904147e51e2414e0ec0dbf51956af5..dff37bb144913e5da8ac6df6b39c3763e0e9efb2 100644 (file)
@@ -135,7 +135,7 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
 int main(void)
 {
   CURL *curl;
-  CURLcode res;
+  CURLcode result;
   /* CA cert in PEM format, replace the XXXs */
   char *mypem =
     "-----BEGIN CERTIFICATE-----\n"
@@ -156,15 +156,15 @@ int main(void)
 
   curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
   curl_easy_setopt(curl, CURLOPT_SSL_CTX_DATA, mypem);
-  res = curl_easy_perform(curl);
-  if(!res)
+  result = curl_easy_perform(curl);
+  if(!result)
     printf("*** transfer succeeded ***\n");
   else
     printf("*** transfer failed ***\n");
 
   curl_easy_cleanup(curl);
   curl_global_cleanup();
-  return (int)res;
+  return (int)result;
 }
 ~~~
 
index fcdef1d5b4665ed7994a830a51667d22ee671529..674e1ac6d5e906757db0e01f82c2c56a5a6e7214 100644 (file)
@@ -53,10 +53,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSL_EC_CURVES, "X25519:P-521");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index a9e20a68d3972eafadfd12588c4e255cddbac45f..2e0399d0fa6bd5e4f1a8131d9cd896a938a96747 100644 (file)
@@ -45,10 +45,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_ALPN, 0L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index e8a6649bfdbb70cc5e1c1625e7fdae62d287e7cf..46b8c9dbb4e361c8e63a5a879d06af4c6d059992 100644 (file)
@@ -47,10 +47,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSL_ENABLE_NPN, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index ddd7965ee2efb7b49f1b43a5f69d9b99c481b687..7767b0528027042c30ef584ad9fec68f43e20dc8 100644 (file)
@@ -118,12 +118,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* weaken TLS only for use with silly servers */
     curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS,
                      CURLSSLOPT_ALLOW_BEAST | CURLSSLOPT_NO_REVOKE);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 6f0d527b83f3879b2dd4fed2e4d0906ee05ea5f4..2e0c7c6fc0d44f43fc4376e39065d94529627926 100644 (file)
@@ -50,11 +50,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* switch off session-id use */
     curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 4fce470bf8123ca3d4a4f83706c34df3927ab603..4e7644719c0845bea2462f7dce9f38be59fe81da 100644 (file)
@@ -60,11 +60,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_SSL_SIGNATURE_ALGORITHMS,
                      "DSA+SHA256:rsa_pss_pss_sha256");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 14e1ab08b0846e1d25dbbc95d9e2c3b905ec08cf..b1d373eef69c1b07e9f787e9fb9e25fc092346c3 100644 (file)
@@ -51,11 +51,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     /* ask for OCSP stapling */
     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYSTATUS, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index f306c64fa29ed25fb8e1ed432c9c0f4a0c60cd75..8cab6200bca45516997a7dbd065bfd13f29e861f 100644 (file)
@@ -51,13 +51,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     struct curl_slist *options;
     options = curl_slist_append(NULL, "TTTYPE=vt100");
     options = curl_slist_append(options, "USER=foobar");
     curl_easy_setopt(curl, CURLOPT_URL, "telnet://example.com/");
     curl_easy_setopt(curl, CURLOPT_TELNETOPTIONS, options);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
     curl_slist_free_all(options);
   }
index dd299ec922e2806d2c1a9f44fc99c4ac3ec9da49..d2de3c19c7493617c76f662636bb17d85f024960 100644 (file)
@@ -45,11 +45,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "tftp://example.com/bootimage");
     /* try using larger blocks */
     curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, 2048L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 41cdec07bc514b88cdf44df52efd323c72d56e9f..07dcc79c6443a98b55de2be5951eaa0bd98b940c 100644 (file)
@@ -70,11 +70,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_TLS13_CIPHERS,
                      "TLS_CHACHA20_POLY1305_SHA256");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index d6c871118ce023f06ac39840f420027f30965d94..8ff3d95c582dc95684383394e0080fb7dc5b7368 100644 (file)
@@ -56,12 +56,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
     curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
     curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 64ce85e5db43963b07fae90b6bc7b1170f8b7d85..078c41c253d2f2ff996371045cbd83e18f54b8c9 100644 (file)
@@ -60,12 +60,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
     curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
     curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 230c3babee22b2018fd6948ae7086fc98f8e70cc..654d858f8339047b23dbc320f922002c952857ea 100644 (file)
@@ -55,12 +55,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
     curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
     curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
     curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 06362337658fc4570c17fd60c8772feb0e2f3231..716967d88adf27682030a09e1e689c6b4350588e 100644 (file)
@@ -78,7 +78,7 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
 
     /* Set the URL of the request */
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
@@ -91,13 +91,13 @@ int main(void)
 
     struct curl_slist *headers = NULL;
     headers = curl_slist_append(headers, "Trailer: My-super-awesome-trailer");
-    res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
+    result = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
 
     /* Set the trailers filling callback */
     curl_easy_setopt(curl, CURLOPT_TRAILERFUNCTION, trailer_cb);
 
     /* Perform the transfer */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
 
index 4923f33d8ff98890b0e6126ad485dddef7764ee5..f99dc8df5e4230c1b7407ab81b6b757e237789ef 100644 (file)
@@ -48,10 +48,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/textfile");
     curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index 209ea32e4e3386a87477a03fd4f9a1ec61ec6b76..746d14c0dd411f49d5f471aaf52343241aba0866 100644 (file)
@@ -59,13 +59,13 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/foo.bin");
 
     /* ask libcurl to allocate a larger upload buffer */
     curl_easy_setopt(curl, CURLOPT_UPLOAD_BUFFERSIZE, 120000L);
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index 736c80cf81d7a475d0fc62b4565ac68647423d1e..916c9dd831d23d5672bf9dbb9a32caa1bdd96892 100644 (file)
@@ -70,12 +70,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     curl_easy_setopt(curl, CURLOPT_USERNAME, "clark");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index ba54949bee683d2d527a7b0f94a83bf2bf0a67ca..e3727baec9f2441d29fe1df643d6066f07526b47 100644 (file)
@@ -79,12 +79,12 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
 
     curl_easy_setopt(curl, CURLOPT_USERPWD, "clark:kent");
 
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     curl_easy_cleanup(curl);
   }
index ad4b4e0360f369d6ec31e337bfc1aa3ae2934fc8..8cc97a6e40cd9fd28ff28570ea4061784f85429d 100644 (file)
@@ -107,7 +107,7 @@ static size_t cb(char *data, size_t size, size_t nmemb, void *clientp)
 int main(void)
 {
   struct memory chunk = { 0 };
-  CURLcode res;
+  CURLcode result;
   CURL *curl = curl_easy_init();
   if(curl) {
     /* send all data to this function  */
@@ -117,7 +117,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
 
     /* send a request */
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
 
     /* remember to free the buffer */
     free(chunk.response);
index d1488a762b14d1739ca7af386662d9514e3ad852..a76396f38c8faf19bd2d19b8f4c2b2cc130863ff 100644 (file)
@@ -64,11 +64,11 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "ws://example.com/");
     /* tell curl we deal with all the WebSocket magic ourselves */
     curl_easy_setopt(curl, CURLOPT_WS_OPTIONS, CURLWS_RAW_MODE);
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }
index d80e38ed78cd143c2c7473cd5af9632f39f8573e..894c1384a5e2504a58245a16933496ba83f9871e 100644 (file)
@@ -56,10 +56,10 @@ int main(void)
 {
   CURL *curl = curl_easy_init();
   if(curl) {
-    CURLcode res;
+    CURLcode result;
     curl_easy_setopt(curl, CURLOPT_URL, "pop3://example.com/");
     curl_easy_setopt(curl, CURLOPT_XOAUTH2_BEARER, "1ab9cb22bf269a7");
-    res = curl_easy_perform(curl);
+    result = curl_easy_perform(curl);
     curl_easy_cleanup(curl);
   }
 }