]> granicus.if.org Git - curl/commitdiff
code: style updates
authorDaniel Stenberg <daniel@haxx.se>
Sun, 3 Apr 2016 18:28:34 +0000 (20:28 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 3 Apr 2016 20:38:36 +0000 (22:38 +0200)
85 files changed:
docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
docs/libcurl/opts/CURLOPT_TIMECONDITION.3
docs/libcurl/opts/CURLOPT_TIMEVALUE.3
include/curl/curl.h
lib/amigaos.c
lib/base64.c
lib/curl_setup.h
lib/easy.c
lib/escape.c
lib/file.c
lib/formdata.c
lib/formdata.h
lib/ftp.c
lib/hostip.c
lib/http.c
lib/http_chunks.c
lib/ldap.c
lib/memdebug.h
lib/multi.c
lib/pingpong.c
lib/share.c
lib/socks.c
lib/splay.h
lib/ssh.c
lib/telnet.c
lib/tftp.c
lib/transfer.c
lib/url.c
lib/vauth/digest.c
lib/vtls/axtls.c
lib/vtls/gtls.c
lib/vtls/mbedtls.c
lib/vtls/schannel.c
src/tool_formparse.c
src/tool_getparam.c
src/tool_operate.c
src/tool_vms.c
tests/libtest/Makefile.am
tests/libtest/first.c
tests/libtest/lib506.c
tests/libtest/lib513.c
tests/libtest/lib514.c
tests/libtest/lib515.c
tests/libtest/lib516.c
tests/libtest/lib519.c
tests/libtest/lib520.c
tests/libtest/lib521.c
tests/libtest/lib523.c
tests/libtest/lib524.c
tests/libtest/lib525.c
tests/libtest/lib537.c
tests/libtest/lib539.c
tests/libtest/lib541.c
tests/libtest/lib542.c
tests/libtest/lib543.c
tests/libtest/lib544.c
tests/libtest/lib549.c
tests/libtest/lib552.c
tests/libtest/lib555.c
tests/libtest/lib556.c
tests/libtest/lib558.c
tests/libtest/lib566.c
tests/libtest/lib567.c
tests/libtest/lib569.c
tests/libtest/lib570.c
tests/libtest/lib571.c
tests/libtest/lib572.c
tests/libtest/lib573.c
tests/libtest/lib574.c
tests/libtest/lib576.c
tests/libtest/lib578.c
tests/libtest/lib579.c
tests/libtest/lib586.c
tests/libtest/lib590.c
tests/libtest/lib598.c
tests/libtest/lib599.c
tests/unit/unit1301.c
tests/unit/unit1302.c
tests/unit/unit1303.c
tests/unit/unit1305.c
tests/unit/unit1307.c
tests/unit/unit1397.c
tests/unit/unit1398.c
tests/unit/unit1602.c
tests/unit/unit1603.c

index 56e78ff1748a8ca45ec8dcfb2ed92c339b50a897..113021e71343a9b3db790ba115e67ef79b31a14e 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2014, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
index d8acd1c15ed30ae7e1a55db6ebe4939f87f0adb3..a8fcea7b104cb0eda330156438f161fa3c026ff9 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2014, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
index 92ca6f6b4b849db04198493560480441669d75d1..cd745ffa7a3a58c3eb8af80ec24e487c8fa7c305 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2014, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
index a81574e1af15eab04c282ad8edbae262e1d36a6a..954b014df45bd98cade45987f68dfb1644818c88 100644 (file)
@@ -473,9 +473,9 @@ typedef enum {
   CURLE_OBSOLETE44,              /* 44 - NOT USED */
   CURLE_INTERFACE_FAILED,        /* 45 - CURLOPT_INTERFACE failed */
   CURLE_OBSOLETE46,              /* 46 - NOT USED */
-  CURLE_TOO_MANY_REDIRECTS ,     /* 47 - catch endless re-direct loops */
+  CURLE_TOO_MANY_REDIRECTS     /* 47 - catch endless re-direct loops */
   CURLE_UNKNOWN_OPTION,          /* 48 - User specified an unknown option */
-  CURLE_TELNET_OPTION_SYNTAX ,   /* 49 - Malformed telnet option */
+  CURLE_TELNET_OPTION_SYNTAX   /* 49 - Malformed telnet option */
   CURLE_OBSOLETE50,              /* 50 - NOT USED */
   CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
                                      wasn't verified fine */
index e2fe35d1fb53d98412369ab61bbd91608e4ca41a..5591d22209fb8518605363a60593338d86b59458 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -35,7 +35,7 @@ extern int errno, h_errno;
 #include <stabs.h>
 void __request(const char *msg);
 #else
-# define __request( msg )       Printf( msg "\n\a")
+# define __request(msg)       Printf(msg "\n\a")
 #endif
 
 void Curl_amiga_cleanup()
index 9bb7de4952b67fd0377fef44954d1af5b86cf030..9facd38638a8cadcb95744263ce6218f6f6efdd8 100644 (file)
@@ -246,7 +246,7 @@ static CURLcode base64_encode(const char *table64,
                table64[obuf[0]],
                table64[obuf[1]],
                table64[obuf[2]],
-               table64[obuf[3]] );
+               table64[obuf[3]]);
       break;
     }
     output += 4;
index 516327345ac2a110095610291f6f6005015c0017..da26e48cbe7d9479505aab4dc7728d9085e36cbc 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #  endif
 
 #  ifndef fileno /* sunos 4 have this as a macro! */
-     int fileno( FILE *stream);
+     int fileno(FILE *stream);
 #  endif
 
 #endif /* WIN32 */
index 2bddbb22fddbf171c9a259b6e994bf08fc3052a8..390888a8d2806692ebef3f8bcc527974cdf62eeb 100644 (file)
@@ -121,8 +121,8 @@ static CURLcode win32_init(void)
   /* wVersionRequested in wVersion. wHighVersion contains the */
   /* highest supported version. */
 
-  if(LOBYTE( wsaData.wVersion ) != LOBYTE(wVersionRequested) ||
-     HIBYTE( wsaData.wVersion ) != HIBYTE(wVersionRequested) ) {
+  if(LOBYTE(wsaData.wVersion) != LOBYTE(wVersionRequested) ||
+     HIBYTE(wsaData.wVersion) != HIBYTE(wVersionRequested) ) {
     /* Tell the user that we couldn't find a useable */
 
     /* winsock.dll. */
@@ -625,7 +625,7 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
     if(0 == pollrc) {
       /* timeout! */
       ev->ms = 0;
-      /* fprintf(stderr, "call curl_multi_socket_action( TIMEOUT )\n"); */
+      /* fprintf(stderr, "call curl_multi_socket_action(TIMEOUT)\n"); */
       mcode = curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0,
                                        &ev->running_handles);
     }
@@ -635,7 +635,7 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
         if(fds[i].revents) {
           /* socket activity, tell libcurl */
           int act = poll2cselect(fds[i].revents); /* convert */
-          infof(multi->easyp, "call curl_multi_socket_action( socket %d )\n",
+          infof(multi->easyp, "call curl_multi_socket_action(socket %d)\n",
                 fds[i].fd);
           mcode = curl_multi_socket_action(multi, fds[i].fd, act,
                                            &ev->running_handles);
index 40338a90449ef590fd179abe218e9bf751aed4b2..8299ab3961451c1859cec93b53d85d6e93d16440 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -105,7 +105,7 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength)
         alloc *= 2;
         testing_ptr = realloc(ns, alloc);
         if(!testing_ptr) {
-          free( ns );
+          free(ns);
           return NULL;
         }
         else {
index e4079054c3e201f72dbe7a0d5da4d9dafdb25da7..350c3eeced14549f89ff7f22eb7688eddbc32b7f 100644 (file)
@@ -368,7 +368,7 @@ static CURLcode file_upload(struct connectdata *conn)
 
     /*skip bytes before resume point*/
     if(data->state.resume_from) {
-      if((curl_off_t)nread <= data->state.resume_from ) {
+      if((curl_off_t)nread <= data->state.resume_from) {
         data->state.resume_from -= nread;
         nread = 0;
         buf2 = buf;
index b1bc067cad6c24b82d500542d4ec8a3a3fc38a58..667371c80f5613292e66bfe95c1121af9784ab69 100644 (file)
@@ -632,7 +632,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
       else {
         if(((form->flags & HTTPPOST_FILENAME) ||
             (form->flags & HTTPPOST_BUFFER)) &&
-           !form->contenttype ) {
+           !form->contenttype) {
           char *f = form->flags & HTTPPOST_BUFFER?
             form->showfilename : form->value;
 
@@ -1273,7 +1273,7 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
       curList = file->contentheader;
       while(curList) {
         /* Process the additional headers specified for this form */
-        result = AddFormDataf( &form, &size, "\r\n%s", curList->data );
+        result = AddFormDataf(&form, &size, "\r\n%s", curList->data);
         if(result)
           break;
         curList = curList->next;
@@ -1386,7 +1386,7 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
  * Curl_FormInit() inits the struct 'form' points to with the 'formdata'
  * and resets the 'sent' counter.
  */
-int Curl_FormInit(struct Form *form, struct FormData *formdata )
+int Curl_FormInit(struct Form *form, struct FormData *formdata)
 {
   if(!formdata)
     return 1; /* error */
@@ -1499,9 +1499,9 @@ size_t Curl_FormReader(char *buffer,
   }
   do {
 
-    if((form->data->length - form->sent ) > wantedsize - gotsize) {
+    if((form->data->length - form->sent) > wantedsize - gotsize) {
 
-      memcpy(buffer + gotsize , form->data->line + form->sent,
+      memcpy(buffer + gotsize, form->data->line + form->sent,
              wantedsize - gotsize);
 
       form->sent += wantedsize-gotsize;
index 3fe1e83bddd4255c7577ab8f43ac213e15aa1d1f..a5ebc1d451f95fb1c6332ad4c016ea4a51acc217 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -68,7 +68,7 @@ typedef struct FormInfo {
   struct FormInfo *more;
 } FormInfo;
 
-int Curl_FormInit(struct Form *form, struct FormData *formdata );
+int Curl_FormInit(struct Form *form, struct FormData *formdata);
 
 CURLcode Curl_getformdata(struct SessionHandle *data,
                           struct FormData **,
index 2999e2a3b6a1a9aac9c0aa0408cf35fb7d14828b..27f48b58545688652f7618e7ec416e90ab487ec6 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -710,7 +710,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
     /* check and reset timeout value every lap */
     timeout = Curl_pp_state_timeout(pp);
 
-    if(timeout <=0 ) {
+    if(timeout <=0) {
       failf(data, "FTP response timeout");
       return CURLE_OPERATION_TIMEDOUT; /* already too little time */
     }
@@ -1036,7 +1036,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
     if(*string_ftpport == '[') {
       /* [ipv6]:port(-range) */
       ip_start = string_ftpport + 1;
-      if((ip_end = strchr(string_ftpport, ']')) != NULL )
+      if((ip_end = strchr(string_ftpport, ']')) != NULL)
         strncpy(addr, ip_start, ip_end - ip_start);
     }
     else
@@ -1057,7 +1057,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
       else
 #endif
         /* (ipv4|domain|interface):port(-range) */
-        strncpy(addr, string_ftpport, ip_end - ip_start );
+        strncpy(addr, string_ftpport, ip_end - ip_start);
     }
     else
       /* ipv4|interface */
@@ -1077,11 +1077,11 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
 
     /* correct errors like:
      *  :1234-1230
-     *  :-4711 , in this case port_min is (unsigned)-1,
+     *  :-4711 in this case port_min is (unsigned)-1,
      *           therefore port_min > port_max for all cases
      *           but port_max = (unsigned)-1
      */
-    if(port_min > port_max )
+    if(port_min > port_max)
       port_min = port_max = 0;
 
 
@@ -1525,12 +1525,12 @@ static CURLcode ftp_state_list(struct connectdata *conn)
     }
   }
 
-  cmd = aprintf( "%s%s%s",
-                 data->set.str[STRING_CUSTOMREQUEST]?
-                 data->set.str[STRING_CUSTOMREQUEST]:
-                 (data->set.ftp_list_only?"NLST":"LIST"),
-                 lstArg? " ": "",
-                 lstArg? lstArg: "" );
+  cmd = aprintf("%s%s%s",
+                data->set.str[STRING_CUSTOMREQUEST]?
+                data->set.str[STRING_CUSTOMREQUEST]:
+                (data->set.ftp_list_only?"NLST":"LIST"),
+                lstArg? " ": "",
+                lstArg? lstArg: "");
 
   if(!cmd) {
     free(lstArg);
@@ -1652,7 +1652,7 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn,
     /* 4. lower the infilesize counter */
     /* => transfer as usual */
 
-    if(data->state.resume_from < 0 ) {
+    if(data->state.resume_from < 0) {
       /* Got no given size to start from, figure it out */
       PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file);
       state(conn, FTP_STOR_SIZE);
index d7984974531fddbe13c4e79d83801711a66dea66..727b62dfe209d49e2f77a3db7167f2cadb5d28f6 100644 (file)
@@ -778,7 +778,7 @@ CURLcode Curl_loadhostpairs(struct SessionHandle *data)
   char address[256];
   int port;
 
-  for(hostp = data->change.resolve; hostp; hostp = hostp->next ) {
+  for(hostp = data->change.resolve; hostp; hostp = hostp->next) {
     if(!hostp->data)
       continue;
     if(hostp->data[0] == '-') {
index f261b3deb5246a412ab0348d7987b620219172eb..91ab8326d22bfa6c3419d3ce62ae9f16206f14e2 100644 (file)
@@ -2148,7 +2148,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
      * file size before we continue this venture in the dark lands of HTTP.
      *********************************************************************/
 
-    if(data->state.resume_from < 0 ) {
+    if(data->state.resume_from < 0) {
       /*
        * This is meant to get the size of the present remote-file by itself.
        * We don't support this now. Bail out!
index 53091738a01928d23750de7f2b1c077d7872a0b2..9eadb02652a1b65d82ebe4753ea316c9c6c3f683 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -37,6 +37,7 @@
 #include "curl_memory.h"
 #include "memdebug.h"
 
+/* !checksrc! disable SPACEBEFORECLOSE 1 */
 /*
  * Chunk format (simplified):
  *
@@ -80,7 +81,7 @@ static bool Curl_isxdigit(char digit)
 {
   return ( (digit >= 0x30 && digit <= 0x39) /* 0-9 */
         || (digit >= 0x41 && digit <= 0x46) /* A-F */
-        || (digit >= 0x61 && digit <= 0x66) /* a-f */ ) ? TRUE : FALSE;
+        || (digit >= 0x61 && digit <= 0x66) /* a-f */) ? TRUE : FALSE;
 }
 
 void Curl_httpchunk_init(struct connectdata *conn)
index 4f4c7072a8102f8bc94891cb4dd1e723501dc455..d355a6676f87ac2c7869cc0d6d3d107f5ec64c19 100644 (file)
@@ -5,7 +5,7 @@
  *                | (__| |_| |  _ <| |___
  *                 \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -228,7 +228,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
     goto quit;
   }
 
-  /* Get the URL scheme ( either ldap or ldaps ) */
+  /* Get the URL scheme (either ldap or ldaps) */
   if(conn->given->flags & PROTOPT_SSL)
     ldap_ssl = 1;
   infof(data, "LDAP local: trying to establish %s connection\n",
@@ -717,7 +717,7 @@ static int str2scope (const char *p)
      return LDAP_SCOPE_BASE;
   if(strequal(p, "sub"))
      return LDAP_SCOPE_SUBTREE;
-  if(strequal( p, "subtree"))
+  if(strequal(p, "subtree"))
      return LDAP_SCOPE_SUBTREE;
   return (-1);
 }
index ce1a842af061e9b346942862dbadfcfd21377251..a443a42a3a5a3a82694f3d7aa349d3dbc2608c75 100644 (file)
@@ -8,7 +8,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -57,17 +57,17 @@ CURL_EXTERN void curl_memlog(const char *format, ...);
 
 /* file descriptor manipulators */
 CURL_EXTERN curl_socket_t curl_socket(int domain, int type, int protocol,
-                                      int line , const char *source);
+                                      int line, const char *source);
 CURL_EXTERN void curl_mark_sclose(curl_socket_t sockfd,
-                                  int line , const char *source);
+                                  int line, const char *source);
 CURL_EXTERN int curl_sclose(curl_socket_t sockfd,
-                            int line , const char *source);
+                            int line, const char *source);
 CURL_EXTERN curl_socket_t curl_accept(curl_socket_t s, void *a, void *alen,
                                       int line, const char *source);
 #ifdef HAVE_SOCKETPAIR
 CURL_EXTERN int curl_socketpair(int domain, int type, int protocol,
                                 curl_socket_t socket_vector[2],
-                                int line , const char *source);
+                                int line, const char *source);
 #endif
 
 /* FILE functions */
index 522671d3e9c9ac41496c6b93e8ebe7b743509df9..1447ba8fa32d2c5fb64cbc9aefb07e8e06d72427 100644 (file)
@@ -1798,7 +1798,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
         result = Curl_speedcheck(data, now);
 
       if(( (data->set.max_send_speed == 0) ||
-           (data->progress.ulspeed < data->set.max_send_speed ))  &&
+           (data->progress.ulspeed < data->set.max_send_speed))  &&
          ( (data->set.max_recv_speed == 0) ||
            (data->progress.dlspeed < data->set.max_recv_speed)))
         multistate(data, CURLM_STATE_PERFORM);
@@ -2478,7 +2478,7 @@ static CURLMcode add_next_timeout(struct timeval now,
   /* move over the timeout list for this specific handle and remove all
      timeouts that are now passed tense and store the next pending
      timeout in *tv */
-  for(e = list->head; e; ) {
+  for(e = list->head; e;) {
     struct curl_llist_element *n = e->next;
     long diff = curlx_tvdiff(*(struct timeval *)e->ptr, now);
     if(diff <= 0)
index 5fea5dee7d71877e57369861d7bb740d4bafef2a..2aecf4e8a3b0b429bde1a8908d7b91b49c1cecc7 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -88,7 +88,7 @@ CURLcode Curl_pp_statemach(struct pingpong *pp, bool block)
   struct SessionHandle *data=conn->data;
   CURLcode result = CURLE_OK;
 
-  if(timeout_ms <=0 ) {
+  if(timeout_ms <=0) {
     failf(data, "server response timeout");
     return CURLE_OPERATION_TIMEDOUT; /* already too little time */
   }
index 01503e06eab5e7456795ae9c3a671c1c72b97e9f..58c59123198cb4ac57e4b0cb814ff57ba8bceb21 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -71,14 +71,14 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
     /* this is a type this share will share */
     type = va_arg(param, int);
     share->specifier |= (1<<type);
-    switch( type ) {
+    switch(type) {
     case CURL_LOCK_DATA_DNS:
       break;
 
     case CURL_LOCK_DATA_COOKIE:
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
       if(!share->cookies) {
-        share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE );
+        share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE);
         if(!share->cookies)
           res = CURLSHE_NOMEM;
       }
@@ -114,7 +114,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
     /* this is a type this share will no longer share */
     type = va_arg(param, int);
     share->specifier &= ~(1<<type);
-    switch( type ) {
+    switch(type) {
     case CURL_LOCK_DATA_DNS:
       break;
 
index e7d42e77b6aa6b14d6b61eb4e1b9ed199f927792..8c4129647ec4907497fa134c688360869507ca98 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -173,8 +173,8 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
       unsigned short ip[4];
       Curl_printable_address(hp, buf, sizeof(buf));
 
-      if(4 == sscanf( buf, "%hu.%hu.%hu.%hu",
-                      &ip[0], &ip[1], &ip[2], &ip[3])) {
+      if(4 == sscanf(buf, "%hu.%hu.%hu.%hu",
+                     &ip[0], &ip[1], &ip[2], &ip[3])) {
         /* Set DSTIP */
         socksreq[4] = (unsigned char)ip[0];
         socksreq[5] = (unsigned char)ip[1];
index 1af9414de0b3dc7191cd3fd863052fd51063b668..427bfc8eb41bde5c41f88abf3a30d861503cecd8 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1997 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1997 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -55,7 +55,7 @@ int Curl_splayremovebyaddr(struct Curl_tree *t,
 #define Curl_splaycomparekeys(i,j) ( ((i.tv_sec)  < (j.tv_sec))  ? -1 : \
                                    ( ((i.tv_sec)  > (j.tv_sec))  ?  1 : \
                                    ( ((i.tv_usec) < (j.tv_usec)) ? -1 : \
-                                   ( ((i.tv_usec) > (j.tv_usec)) ?  1 : 0 ))))
+                                   ( ((i.tv_usec) > (j.tv_usec)) ?  1 : 0))))
 
 #ifdef DEBUGBUILD
 void Curl_splayprint(struct Curl_tree * t, int d, char output);
index 85069125ed289678e46bb900b2c91f5dcbd8b7d7..da19bf3dc15b48fbca8f55a266eea41a4d1aea72 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -417,7 +417,7 @@ static CURLcode ssh_getworkingpath(struct connectdata *conn,
   if(!working_path)
     return CURLE_OUT_OF_MEMORY;
 
-  /* Check for /~/ , indicating relative to the user's home directory */
+  /* Check for /~/, indicating relative to the user's home directory */
   if(conn->handler->protocol & CURLPROTO_SCP) {
     real_path = malloc(working_path_len+1);
     if(real_path == NULL) {
index 4ebc49252a256e6e64540dd7d495105318a04375..068470b93a3bcefda12df47db2cd3b3f05bb72d0 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -91,7 +91,7 @@
 
 #ifdef USE_WINSOCK
 typedef FARPROC WSOCK2_FUNC;
-static CURLcode check_wsock2 ( struct SessionHandle *data );
+static CURLcode check_wsock2 (struct SessionHandle *data);
 #endif
 
 static
@@ -198,7 +198,7 @@ const struct Curl_handler Curl_handler_telnet = {
 
 #ifdef USE_WINSOCK
 static CURLcode
-check_wsock2 ( struct SessionHandle *data )
+check_wsock2(struct SessionHandle *data)
 {
   int err;
   WORD wVersionRequested;
index f44733944ce1ecefde9693b9e408f445c3760ef5..975ef2faf8250a57ee4d36a5de745f5ee2f0b74f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -312,14 +312,14 @@ static const char *tftp_option_get(const char *buf, size_t len,
 {
   size_t loc;
 
-  loc = Curl_strnlen( buf, len );
+  loc = Curl_strnlen(buf, len);
   loc++; /* NULL term */
 
   if(loc >= len)
     return NULL;
   *option = buf;
 
-  loc += Curl_strnlen( buf+loc, len-loc );
+  loc += Curl_strnlen(buf+loc, len-loc);
   loc++; /* NULL term */
 
   if(loc > len)
@@ -352,7 +352,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
     if(checkprefix(option, TFTP_OPTION_BLKSIZE)) {
       long blksize;
 
-      blksize = strtol( value, NULL, 10 );
+      blksize = strtol(value, NULL, 10);
 
       if(!blksize) {
         failf(data, "invalid blocksize value in OACK packet");
@@ -384,7 +384,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
     else if(checkprefix(option, TFTP_OPTION_TSIZE)) {
       long tsize = 0;
 
-      tsize = strtol( value, NULL, 10 );
+      tsize = strtol(value, NULL, 10);
       infof(data, "%s (%ld)\n", "tsize parsed from OACK", tsize);
 
       /* tsize should be ignored on upload: Who cares about the size of the
@@ -405,7 +405,7 @@ static CURLcode tftp_parse_option_ack(tftp_state_data_t *state,
 static size_t tftp_option_add(tftp_state_data_t *state, size_t csize,
                               char *buf, const char *option)
 {
-  if(( strlen(option) + csize + 1 ) > (size_t)state->blksize)
+  if(( strlen(option) + csize + 1) > (size_t)state->blksize)
     return 0;
   strcpy(buf, option);
   return strlen(option) + 1;
@@ -514,7 +514,7 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
                                 (char *)state->spacket.data+sbytes,
                                 TFTP_OPTION_BLKSIZE);
       sbytes += tftp_option_add(state, sbytes,
-                                (char *)state->spacket.data+sbytes, buf );
+                                (char *)state->spacket.data+sbytes, buf);
 
       /* add timeout option */
       snprintf(buf, sizeof(buf), "%d", state->retry_time);
@@ -522,7 +522,7 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
                                 (char *)state->spacket.data+sbytes,
                                 TFTP_OPTION_INTERVAL);
       sbytes += tftp_option_add(state, sbytes,
-                                (char *)state->spacket.data+sbytes, buf );
+                                (char *)state->spacket.data+sbytes, buf);
     }
 
     /* the typecase for the 3rd argument is mostly for systems that do
@@ -960,7 +960,7 @@ static CURLcode tftp_connect(struct connectdata *conn, bool *done)
   /* alloc pkt buffers based on specified blksize */
   if(conn->data->set.tftp_blksize) {
     blksize = (int)conn->data->set.tftp_blksize;
-    if(blksize > TFTP_BLKSIZE_MAX || blksize < TFTP_BLKSIZE_MIN )
+    if(blksize > TFTP_BLKSIZE_MAX || blksize < TFTP_BLKSIZE_MIN)
       return CURLE_TFTP_ILLEGAL;
   }
 
index 9a3e43f70708c17f45ea926a681575c5da7bee4c..11f9df38f586333b4c8a4baf93a8abce18f2c077 100644 (file)
@@ -694,7 +694,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
         }
 
         nread = (ssize_t) (k->maxdownload - k->bytecount);
-        if(nread < 0 ) /* this should be unusual */
+        if(nread < 0) /* this should be unusual */
           nread = 0;
 
         k->keepon &= ~KEEP_RECV; /* we're done reading */
@@ -779,7 +779,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
           return result;
       }
 
-    } /* if(! header and data to read ) */
+    } /* if(!header and data to read) */
 
     if(conn->handler->readwrite &&
        (excess > 0 && !conn->bits.stream_was_rewound)) {
@@ -805,7 +805,7 @@ static CURLcode readwrite_data(struct SessionHandle *data,
   } while(data_pending(conn) && maxloops--);
 
   if(((k->keepon & (KEEP_RECV|KEEP_SEND)) == KEEP_SEND) &&
-     conn->bits.close ) {
+     conn->bits.close) {
     /* When we've read the entire thing and the close bit is set, the server
        may now close the connection. If there's now any kind of sending going
        on from our side, we need to stop that immediately. */
index 1412644e7cf32d4eec0338ea933e3b07fe66142e..d20c36928c6afab4611bd58bff2f96a0868383e1 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -841,7 +841,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      * Option that specifies how quickly an server response must be obtained
      * before it is considered failure. For pingpong protocols.
      */
-    data->set.server_response_timeout = va_arg( param , long ) * 1000;
+    data->set.server_response_timeout = va_arg(param, long) * 1000;
     break;
   case CURLOPT_TFTP_NO_OPTIONS:
     /*
@@ -2148,7 +2148,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
      */
     data->set.buffer_size = va_arg(param, long);
 
-    if((data->set.buffer_size> (BUFSIZE -1 )) ||
+    if((data->set.buffer_size> (BUFSIZE -1)) ||
        (data->set.buffer_size < 1))
       data->set.buffer_size = 0; /* huge internal default */
 
@@ -5167,7 +5167,7 @@ static CURLcode override_login(struct SessionHandle *data,
             DOT_CHAR "netrc file; using defaults\n",
             conn->host.name);
     }
-    else if(ret < 0 ) {
+    else if(ret < 0) {
       return CURLE_OUT_OF_MEMORY;
     }
     else {
index d22b3d1c486fee581ae2dcf44c6ee4e28c6f0f94..f6ff5a088d87d12ad7555068da87131d5b985b26 100644 (file)
@@ -73,7 +73,7 @@ bool Curl_auth_digest_get_pair(const char *str, char *value, char *content,
   bool starts_with_quote = FALSE;
   bool escape = FALSE;
 
-  for(c = DIGEST_MAX_VALUE_LENGTH - 1; (*str && (*str != '=') && c--); )
+  for(c = DIGEST_MAX_VALUE_LENGTH - 1; (*str && (*str != '=') && c--);)
     *value++ = *str++;
   *value = 0;
 
@@ -689,7 +689,7 @@ CURLcode Curl_auth_create_digest_http_message(struct SessionHandle *data,
 
     If the algorithm is "MD5-sess" then:
 
-      A1 = H( unq(username-value) ":" unq(realm-value) ":" passwd ) ":"
+      A1 = H(unq(username-value) ":" unq(realm-value) ":" passwd) ":"
            unq(nonce-value) ":" unq(cnonce-value)
   */
 
index d9c5f9935c3b58347068f8443f8a019ed37809db..0afcfaa58a13ec7028595057afdb8d6e0e95ac7f 100644 (file)
@@ -6,7 +6,7 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2010, DirecTV, Contact: Eric Hu, <ehu@directv.com>.
- * Copyright (C) 2010 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2010 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -518,7 +518,7 @@ static ssize_t axtls_send(struct connectdata *conn,
 
   infof(conn->data, "  axtls_send\n");
 
-  if(rc < 0 ) {
+  if(rc < 0) {
     *err = map_error_to_curl(rc);
     rc = -1; /* generic error code for send failure */
   }
index 1fef54b48c132a0cd607d0cdfc9f4da8f541ce53..9d1cd508889ee4883c7f0099fffa60a7f0c15bdf 100644 (file)
@@ -1381,7 +1381,7 @@ static ssize_t gtls_send(struct connectdata *conn,
 {
   ssize_t rc = gnutls_record_send(conn->ssl[sockindex].session, mem, len);
 
-  if(rc < 0 ) {
+  if(rc < 0) {
     *curlcode = (rc == GNUTLS_E_AGAIN)
       ? CURLE_AGAIN
       : CURLE_SEND_ERROR;
index f0900a5af3c3e4e2988168b340fff9853521df45..69dd0b11d32498b928f4c0a1f80e14da02264931 100644 (file)
@@ -131,12 +131,12 @@ static void mbedtls_debug(void *context, int level, const char *line)
 const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_fr =
 {
   /* Hashes from SHA-1 and above */
-  MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA1 ) |
-  MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_RIPEMD160 ) |
-  MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA224 ) |
-  MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA256 ) |
-  MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA384 ) |
-  MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA512 ),
+  MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA1) |
+  MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_RIPEMD160) |
+  MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA224) |
+  MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA256) |
+  MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA384) |
+  MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA512),
   0xFFFFFFF, /* Any PK alg    */
   0xFFFFFFF, /* Any curve     */
   1024,      /* RSA min key len */
@@ -322,8 +322,8 @@ mbedtls_connect_step1(struct connectdata *conn,
   }
 
   /* new profile with RSA min key len = 1024 ... */
-  mbedtls_ssl_conf_cert_profile( &connssl->config,
-                                 &mbedtls_x509_crt_profile_fr);
+  mbedtls_ssl_conf_cert_profile(&connssl->config,
+                                &mbedtls_x509_crt_profile_fr);
 
   switch(data->set.ssl.version) {
   case CURL_SSLVERSION_DEFAULT:
index f252a369eedd951babeda0f8147de840e802fa75..4790735abc6c7c6b5366830668e12578ca137027 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012 - 2015, Marc Hoersken, <info@marc-hoersken.de>
+ * Copyright (C) 2012 - 2016, Marc Hoersken, <info@marc-hoersken.de>
  * Copyright (C) 2012, Mark Salisbury, <mark.salisbury@hp.com>
  * Copyright (C) 2012 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
@@ -1326,7 +1326,7 @@ bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex)
 
   if(connssl->use) /* SSL/TLS is in use */
     return (connssl->encdata_offset > 0 ||
-            connssl->decdata_offset > 0 ) ? TRUE : FALSE;
+            connssl->decdata_offset > 0) ? TRUE : FALSE;
   else
     return FALSE;
 }
index 76c27a3429a1583487c06198ea66b4b9bbcd477b..de30c5264b9586027f2fefb92156982ea2f7fcdc 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -323,7 +323,7 @@ int formparse(struct OperationConfig *config,
         info[i].option = CURLFORM_END;
 
         if(curl_formadd(httppost, last_post,
-                        CURLFORM_ARRAY, info, CURLFORM_END ) != 0) {
+                        CURLFORM_ARRAY, info, CURLFORM_END) != 0) {
           warnf(config->global, "curl_formadd failed, possibly the file %s is "
                 "bad!\n", contp + 1);
           Curl_safefree(contents);
index 9bb1b0c5f3d054254018804c03ff0175dc24edc6..cf848c6d7c42d182027d03a0cc2c469d95801733 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -106,8 +106,8 @@ static const struct LongShort aliases[]= {
   {"*u", "crlf",                     FALSE},
   {"*v", "stderr",                   TRUE},
   {"*w", "interface",                TRUE},
-  {"*x", "krb" ,                     TRUE},
-  {"*x", "krb4" ,                    TRUE},
+  {"*x", "krb"                     TRUE},
+  {"*x", "krb4"                    TRUE},
          /* 'krb4' is the previous name */
   {"*y", "max-filesize",             TRUE},
   {"*z", "disable-eprt",             FALSE},
index cefd6ccbf791b1604778b16cc4551a7ecaac27bd..0387e9dcf540f33238dbbb3be10fb10c69ea955f 100644 (file)
@@ -1520,7 +1520,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
                 fflush(outs.stream);
                 /* truncate file at the position where we started appending */
 #ifdef HAVE_FTRUNCATE
-                if(ftruncate( fileno(outs.stream), outs.init)) {
+                if(ftruncate(fileno(outs.stream), outs.init)) {
                   /* when truncate fails, we can't just append as then we'll
                      create something strange, bail out */
                   if(!global->mute)
index de086275151bd7adbb56ae362145eb8c1a4a0581..cc30fe0f4968cb57920f525db1e19a69d35a2c2f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -160,20 +160,20 @@ static void decc_init(void)
   for(i = 0; decc_feat_array[i].name != NULL; i++) {
 
     /* Get the feature index. */
-    feat_index = decc$feature_get_index( decc_feat_array[i].name);
+    feat_index = decc$feature_get_index(decc_feat_array[i].name);
 
     if(feat_index >= 0) {
       /* Valid item.  Collect its properties. */
-      feat_value = decc$feature_get_value( feat_index, 1);
-      feat_value_min = decc$feature_get_value( feat_index, 2);
-      feat_value_max = decc$feature_get_value( feat_index, 3);
+      feat_value = decc$feature_get_value(feat_index, 1);
+      feat_value_min = decc$feature_get_value(feat_index, 2);
+      feat_value_max = decc$feature_get_value(feat_index, 3);
 
       if((decc_feat_array[i].value >= feat_value_min) &&
          (decc_feat_array[i].value <= feat_value_max)) {
         /* Valid value.  Set it if necessary. */
         if(feat_value != decc_feat_array[i].value) {
-          sts = decc$feature_set_value( feat_index, 1,
-                                        decc_feat_array[i].value);
+          sts = decc$feature_set_value(feat_index, 1,
+                                       decc_feat_array[i].value);
         }
       }
       else {
index e396af4dab726740044cc0d3fccee010139d7a2a..de83fcd232cb9356a7d7b93c81ca025d00538cde 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2013, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
index 4714395ea5e0e52722b2a2a5925c51fcec641316..231ae368cbbe766fac1d8bd364c6abbcc3557a10 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -69,7 +69,7 @@ void wait_ms(int ms)
   t.tv_sec = ms/1000;
   ms -= (int)t.tv_sec * 1000;
   t.tv_usec = ms * 1000;
-  select_wrapper(0, NULL, NULL , NULL, &t);
+  select_wrapper(0, NULL, NULL, NULL, &t);
 }
 
 char *libtest_arg2=NULL;
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
   setlocale(LC_ALL, "");
 #endif
 
-  if(argc< 2 ) {
+  if(argc< 2) {
     fprintf(stderr, "Pass URL as argument please\n");
     return 1;
   }
index 265b1ed5cc8d66db16b0b09f25c370851c73e60c..8de30c20b4048554c44608a77e905c86aef793f2 100644 (file)
@@ -80,7 +80,7 @@ static void my_lock(CURL *handle, curl_lock_data data,
 }
 
 /* unlock callback */
-static void my_unlock(CURL *handle, curl_lock_data data, void *useptr )
+static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
 {
   const char *what;
   struct userdata *user = (struct userdata *)useptr;
@@ -345,7 +345,7 @@ int test(char *URL)
   /* try to free share, expect to fail because share is in use*/
   printf("try SHARE_CLEANUP...\n");
   scode = curl_share_cleanup(share);
-  if(scode==CURLSHE_OK ) {
+  if(scode==CURLSHE_OK) {
     fprintf(stderr, "curl_share_cleanup succeed but error expected\n");
     share = NULL;
   }
@@ -364,7 +364,7 @@ test_cleanup:
   /* free share */
   printf("SHARE_CLEANUP\n");
   scode = curl_share_cleanup(share);
-  if(scode!=CURLSHE_OK )
+  if(scode!=CURLSHE_OK)
     fprintf(stderr, "curl_share_cleanup failed, code errno %d\n",
             (int)scode);
 
index b2f1d77882bba65ae861094d53ccb7662738a51b..58091ef6aa15c8a45ff0dbbe90787025dcffc5cf 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 75c5acc4aa5db636587b7f332b22493e25add7b6..f516d094229ea4c67e98e1dfc6707e60763433f4 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index f9ace04ee1c1ac5dc5c6ca7328d6d7fca10ae12a..d3e6e446a0c79bedeb171129dc028c2ac21c1de4 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 13b3b3d17ca8452a03cf00bd539f399b2e9c6e9a..9faf262c6d228cf887817a3de266ee9b021ef498 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 730d42a3ce982a09ee0b5b271204c4140f61b6ce..6e3059892d0d8f672bd58eecb369a29d93e4cd14 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 7e54cd180fab783c506cb47a20cc69d5579cff85..b5a71da27a34ad32d449f76c3b26f210e55452d7 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index e6d6b2387ec6eb1e4edb64138f1edd509103cb2f..40f4def4f4ab0e477e1e49b06f4cf4d51464611d 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index f947382056af114a75467d651c154f302ac11ff4..f3264690da815f803abeab7d1f40575326f66bf1 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 77d486b006bae5c3f554fd52d1c08e7909c2de84..3440562b22904dbcbaafd66b5690825247a7de46 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 2daa1ef317a3996c1924396fc526bb789448bef7..4bf259d21a3af8be8ab16310951e38b1a443ba9f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 4efb5387cdef8f3a5b899012aa6f5138916b00bb..c1561419affbe360420b88498b0cf5dd7e4fe744 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2013, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 34dee9245cdde44fb2c0436070eb266bec61decb..9f0f8fabf388e70e49c13131e06b6459854a4e7f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 9992da7f5cb62cabc03abd7ece34a41527f1cc4b..604446a2ee30e5aba488011d0a114f77eb5a6f76 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 2ce67b944335b98f6d6b2b9a8aad09a4ba6bd0ba..c82ccd5b70318f00974f1e5ba870b0403865d61e 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 6001e8f1cf912b1498d4b5d49b38aa55be64dd2d..8fec052d21d77579a7f7fe71ae823361b4b745e9 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 736744425f7275354fc2bc4df6dd6f3e1b31911b..4b08a0a76ff31bfcfb20dcc3252178e879a72e79 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2014, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 4b35c26caa6a3d56ef781d0a67a00962b73a6731..137029548f7d56b411cebee6dfd8850c371a5dc9 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index e63cebc4981671b6635cf84c93909e87fe402641..9fe4a716833266a51fe3ea50ed53b27b02e5c2d8 100644 (file)
@@ -150,7 +150,7 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb,
 static curlioerr ioctl_callback(CURL * handle, int cmd, void *clientp)
 {
   (void)clientp;
-  if(cmd == CURLIOCMD_RESTARTREAD ) {
+  if(cmd == CURLIOCMD_RESTARTREAD) {
     printf("APPLICATION: recieved a CURLIOCMD_RESTARTREAD request\n");
     printf("APPLICATION: ** REWINDING! **\n");
     current_offset = 0;
index 6083c023750ab19a98489948356a03f05920c4a5..e84af87e51648d64c7ef00a22f1763484bbad69d 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index a0b360b335ee3b214aa3245f5460ac59c030f868..527935396a0df3d3ad2440b3c1922510258cd446 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2014, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 05353aa978b7bf8340ff1a5ef3d34496e0f8f3ab..09a50d6b68deb8d96974314122580de577bf80bb 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2013, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 59edb54f4b5fe953ac92875d48072c7464c5e2db..94a91d5dd46cc43ad994c0172f632b0fa3965d1d 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index b71778d7cc9dae3d550da91202781c5c10a64b11..38e0c0b78ab3d8c3db8366779805a9ba1b8a06a4 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index e8578fd3fd8be0e15279c767c7e785e34563630d..55282b69b34ce9dc8b8a76ffaf731310a4abe283 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 511a0a99f277f74c36bee2ab5adaa043a1a07703..2dc57b7612ba5ee160b259d2ec7e143821e38c63 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2013, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 1a4b9d75e8a64d38dce4c09bb405c57a135de9c1..ad6c366b4958beb2c08cff047ba713bcab378aca 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2013, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index bab9bae1a7f326f350314181e0becc23eb4703fa..3475e8060e439797593df9a027bc58ad06ad28dd 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 78840b7451e508b045de69389df92d9eb59b5e19..dce198b50408d774719b6487509e326a710b28e8 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index b29bd2ad5b3601ac1bd1006e3e79c151ce38216f..9f9222b390e044eab3668f005ae01da7530a7cb6 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 7bf5ab0290831474bb2469ec5d5a01e188799525..3b9a9001d5c69f641f9b67e15f2ed87d5d648b3e 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 8d79dc0cc0c721c6a9fb30e1f9919e341bb6e6de..5e01d36e084f3edb9afa84342be0fb182a58b3a7 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 63f3f052157d98df2829b1f36f3a52ea1c66be6b..aae299cccb288b9b47831a17c88439d915cea89e 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index 55ab6b655782eee767f95d4802b2035a255eb0f0..eb7cfa0a9e05e33c1c6a66c6b63181ab5c205c2c 100644 (file)
@@ -45,7 +45,7 @@ static void my_lock(CURL *handle, curl_lock_data data,
   (void)handle;
   (void)laccess;
 
-  switch ( data ) {
+  switch (data) {
     case CURL_LOCK_DATA_SHARE:
       what = "share";
       break;
@@ -67,12 +67,12 @@ static void my_lock(CURL *handle, curl_lock_data data,
 }
 
 /* unlock callback */
-static void my_unlock(CURL *handle, curl_lock_data data, void *useptr )
+static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
 {
   const char *what;
   struct userdata *user = (struct userdata *)useptr;
   (void)handle;
-  switch ( data ) {
+  switch ( data) {
     case CURL_LOCK_DATA_SHARE:
       what = "share";
       break;
@@ -109,17 +109,17 @@ static void *fire(void *ptr)
   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
   curl_easy_setopt(curl, CURLOPT_VERBOSE,    1L);
   curl_easy_setopt(curl, CURLOPT_URL,        tdata->url);
-  printf( "CURLOPT_SHARE\n" );
+  printf("CURLOPT_SHARE\n");
   curl_easy_setopt(curl, CURLOPT_SHARE, tdata->share);
 
-  printf( "PERFORM\n" );
+  printf("PERFORM\n");
   code = curl_easy_perform(curl);
-  if(code != CURLE_OK ) {
+  if(code != CURLE_OK) {
     fprintf(stderr, "perform url '%s' repeat %d failed, curlcode %d\n",
             tdata->url, i, (int)code);
   }
 
-  printf( "CLEANUP\n" );
+  printf("CLEANUP\n");
   curl_easy_cleanup(curl);
 
   return NULL;
@@ -140,39 +140,39 @@ int test(char *URL)
   user.text = (char *)"Pigs in space";
   user.counter = 0;
 
-  printf( "GLOBAL_INIT\n" );
+  printf("GLOBAL_INIT\n");
   if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
     fprintf(stderr, "curl_global_init() failed\n");
     return TEST_ERR_MAJOR_BAD;
   }
 
   /* prepare share */
-  printf( "SHARE_INIT\n" );
+  printf("SHARE_INIT\n");
   if((share = curl_share_init()) == NULL) {
     fprintf(stderr, "curl_share_init() failed\n");
     curl_global_cleanup();
     return TEST_ERR_MAJOR_BAD;
   }
 
-  if(CURLSHE_OK == scode ) {
-    printf( "CURLSHOPT_LOCKFUNC\n" );
-    scode = curl_share_setopt( share, CURLSHOPT_LOCKFUNC, my_lock);
+  if(CURLSHE_OK == scode) {
+    printf("CURLSHOPT_LOCKFUNC\n");
+    scode = curl_share_setopt(share, CURLSHOPT_LOCKFUNC, my_lock);
   }
-  if(CURLSHE_OK == scode ) {
-    printf( "CURLSHOPT_UNLOCKFUNC\n" );
-    scode = curl_share_setopt( share, CURLSHOPT_UNLOCKFUNC, my_unlock);
+  if(CURLSHE_OK == scode) {
+    printf("CURLSHOPT_UNLOCKFUNC\n");
+    scode = curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, my_unlock);
   }
-  if(CURLSHE_OK == scode ) {
-    printf( "CURLSHOPT_USERDATA\n" );
-    scode = curl_share_setopt( share, CURLSHOPT_USERDATA, &user);
+  if(CURLSHE_OK == scode) {
+    printf("CURLSHOPT_USERDATA\n");
+    scode = curl_share_setopt(share, CURLSHOPT_USERDATA, &user);
   }
-  if(CURLSHE_OK == scode ) {
-    printf( "CURL_LOCK_DATA_SSL_SESSION\n" );
-    scode = curl_share_setopt( share, CURLSHOPT_SHARE,
-                               CURL_LOCK_DATA_SSL_SESSION);
+  if(CURLSHE_OK == scode) {
+    printf("CURL_LOCK_DATA_SSL_SESSION\n");
+    scode = curl_share_setopt(share, CURLSHOPT_SHARE,
+                              CURL_LOCK_DATA_SSL_SESSION);
   }
 
-  if(CURLSHE_OK != scode ) {
+  if(CURLSHE_OK != scode) {
     fprintf(stderr, "curl_share_setopt() failed\n");
     curl_share_cleanup(share);
     curl_global_cleanup();
@@ -183,20 +183,20 @@ int test(char *URL)
   res = 0;
 
   /* start treads */
-  for(i=1; i<=THREADS; i++ ) {
+  for(i=1; i<=THREADS; i++) {
 
     /* set thread data */
     tdata.url   = URL;
     tdata.share = share;
 
     /* simulate thread, direct call of "thread" function */
-    printf( "*** run %d\n",i );
-    fire( &tdata );
+    printf("*** run %d\n",i);
+    fire(&tdata);
   }
 
 
   /* fetch a another one */
-  printf( "*** run %d\n", i );
+  printf("*** run %d\n", i);
   if((curl = curl_easy_init()) == NULL) {
     fprintf(stderr, "curl_easy_init() failed\n");
     curl_share_cleanup(share);
@@ -205,38 +205,38 @@ int test(char *URL)
   }
 
   url = URL;
-  test_setopt( curl, CURLOPT_URL,        url );
-  printf( "CURLOPT_SHARE\n" );
-  test_setopt( curl, CURLOPT_SHARE,      share );
+  test_setopt(curl, CURLOPT_URL, url);
+  printf("CURLOPT_SHARE\n");
+  test_setopt(curl, CURLOPT_SHARE, share);
 
-  printf( "PERFORM\n" );
-  curl_easy_perform( curl );
+  printf("PERFORM\n");
+  curl_easy_perform(curl);
 
   /* try to free share, expect to fail because share is in use*/
-  printf( "try SHARE_CLEANUP...\n" );
-  scode = curl_share_cleanup( share );
+  printf("try SHARE_CLEANUP...\n");
+  scode = curl_share_cleanup(share);
   if(scode==CURLSHE_OK) {
     fprintf(stderr, "curl_share_cleanup succeed but error expected\n");
     share = NULL;
   }
   else {
-    printf( "SHARE_CLEANUP failed, correct\n" );
+    printf("SHARE_CLEANUP failed, correct\n");
   }
 
 test_cleanup:
 
   /* clean up last handle */
-  printf( "CLEANUP\n" );
-  curl_easy_cleanup( curl );
+  printf("CLEANUP\n");
+  curl_easy_cleanup(curl);
 
   /* free share */
-  printf( "SHARE_CLEANUP\n" );
-  scode = curl_share_cleanup( share );
-  if(scode!=CURLSHE_OK )
+  printf("SHARE_CLEANUP\n");
+  scode = curl_share_cleanup(share);
+  if(scode!=CURLSHE_OK)
     fprintf(stderr, "curl_share_cleanup failed, code errno %d\n",
             (int)scode);
 
-  printf( "GLOBAL_CLEANUP\n" );
+  printf("GLOBAL_CLEANUP\n");
   curl_global_cleanup();
 
   return res;
index 3d4d0bddffd8ea4f597e79422848398b2fadde38..7b863cc3fa9a9a7be320714114c9b9e835e8270c 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -28,9 +28,9 @@
   It is reproducible by the following steps:
 
   - Use a proxy that offers NTLM and Negotiate ( CURLOPT_PROXY and
-  CURLOPT_PROXYPORT )
+  CURLOPT_PROXYPORT)
   - Tell libcurl NOT to use Negotiate  CURL_EASY_SETOPT(CURLOPT_PROXYAUTH,
-  CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM )
+  CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM)
   - Start the request
 */
 
index 12d4decb852e3a9aff3e40d2afd91d0ad2d3199b..b107f29d481156e70773b0f2e7baac1722902088 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index f917f51a368eb333370c6582b8ca625dac78b71f..1dee0b9784de5d013f4ab3780a286d460b2faf2e 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
index a50fc67d6391f707d184651ebbade8c1ce7289f8..928076e29ddf203900961caa1875cc7114a229dc 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 
 #include "strequal.h"
 
-static CURLcode unit_setup( void ) {return CURLE_OK;}
-static void unit_stop( void ) {}
+static CURLcode unit_setup(void) {return CURLE_OK;}
+static void unit_stop(void) {}
 
 UNITTEST_START
 
 int rc;
 
 rc = curl_strequal("iii", "III");
-fail_unless( rc != 0 , "return code should be zero" );
+fail_unless(rc != 0, "return code should be zero");
 
 rc = curl_strequal("iiia", "III");
-fail_unless( rc == 0 , "return code should be zero" );
+fail_unless(rc == 0, "return code should be zero");
 
 rc = curl_strequal("iii", "IIIa");
-fail_unless( rc == 0 , "return code should be zero" );
+fail_unless(rc == 0, "return code should be zero");
 
 rc = curl_strequal("iiiA", "IIIa");
-fail_unless( rc != 0 , "return code should be non-zero" );
+fail_unless(rc != 0, "return code should be non-zero");
 
 rc = curl_strnequal("iii", "III", 3);
-fail_unless( rc != 0 , "return code should be non-zero" );
+fail_unless(rc != 0, "return code should be non-zero");
 
 rc = curl_strnequal("iiiABC", "IIIcba", 3);
-fail_unless( rc != 0 , "return code should be non-zero" );
+fail_unless(rc != 0, "return code should be non-zero");
 
 rc = curl_strnequal("ii", "II", 3);
-fail_unless( rc != 0 , "return code should be non-zero" );
+fail_unless(rc != 0, "return code should be non-zero");
 
 UNITTEST_STOP
index bc180f77df1a06af837b7858e2e68044c65ec1fb..66054da57976d5b221cb476e7ba73c27d74e7531 100644 (file)
@@ -28,7 +28,7 @@
 
 static struct SessionHandle *data;
 
-static CURLcode unit_setup( void )
+static CURLcode unit_setup(void)
 {
   data = curl_easy_init();
   if(!data)
@@ -36,7 +36,7 @@ static CURLcode unit_setup( void )
   return CURLE_OK;
 }
 
-static void unit_stop( void )
+static void unit_stop(void)
 {
   curl_easy_cleanup(data);
 }
@@ -52,50 +52,50 @@ CURLcode rc;
 rc = Curl_base64_encode(data, "i", 1, &output, &size);
 fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
 fail_unless(size == 4, "size should be 4");
-verify_memory( output, "aQ==", 4);
+verify_memory(output, "aQ==", 4);
 Curl_safefree(output);
 
 rc = Curl_base64_encode(data, "ii", 2, &output, &size);
 fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
 fail_unless(size == 4, "size should be 4");
-verify_memory( output, "aWk=", 4);
+verify_memory(output, "aWk=", 4);
 Curl_safefree(output);
 
 rc = Curl_base64_encode(data, "iii", 3, &output, &size);
 fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
 fail_unless(size == 4, "size should be 4");
-verify_memory( output, "aWlp", 4);
+verify_memory(output, "aWlp", 4);
 Curl_safefree(output);
 
 rc = Curl_base64_encode(data, "iiii", 4, &output, &size);
 fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
 fail_unless(size == 8, "size should be 8");
-verify_memory( output, "aWlpaQ==", 8);
+verify_memory(output, "aWlpaQ==", 8);
 Curl_safefree(output);
 
 rc = Curl_base64_encode(data, "\xff\x01\xfe\x02", 4, &output, &size);
 fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
 fail_unless(size == 8, "size should be 8");
-verify_memory( output, "/wH+Ag==", 8);
+verify_memory(output, "/wH+Ag==", 8);
 Curl_safefree(output);
 
 rc = Curl_base64url_encode(data, "\xff\x01\xfe\x02", 4, &output, &size);
 fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
 fail_unless(size == 8, "size should be 8");
-verify_memory( output, "_wH-Ag==", 8);
+verify_memory(output, "_wH-Ag==", 8);
 Curl_safefree(output);
 
 rc = Curl_base64url_encode(data, "iiii", 4, &output, &size);
 fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
 fail_unless(size == 8, "size should be 8");
-verify_memory( output, "aWlpaQ==", 8);
+verify_memory(output, "aWlpaQ==", 8);
 Curl_safefree(output);
 
 /* 0 length makes it do strlen() */
 rc = Curl_base64_encode(data, "iiii", 0, &output, &size);
 fail_unless(rc == CURLE_OK, "return code should be CURLE_OK");
 fail_unless(size == 8, "size should be 8");
-verify_memory( output, "aWlpaQ==", 8);
+verify_memory(output, "aWlpaQ==", 8);
 Curl_safefree(output);
 
 rc = Curl_base64_decode("aWlpaQ==", &decoded, &size);
index 0d655b7bf0d96ea88002d1b82f3150b705610a8f..7c0731a4782c6ef3e7dbb3358e4066a5c3c76834 100644 (file)
@@ -27,7 +27,7 @@
 
 static struct SessionHandle *data;
 
-static CURLcode unit_setup( void )
+static CURLcode unit_setup(void)
 {
   data = curl_easy_init();
   if(!data)
@@ -35,7 +35,7 @@ static CURLcode unit_setup( void )
   return CURLE_OK;
 }
 
-static void unit_stop( void )
+static void unit_stop(void)
 {
   curl_easy_cleanup(data);
 }
index 093333a792f5e416b685ae84b20cbb0b427795d5..95cfe2b5d990dc3e327a0f28d5abd56b11d2bee4 100644 (file)
@@ -44,7 +44,7 @@ static struct curl_hash hp;
 static char *data_key;
 static struct Curl_dns_entry *data_node;
 
-static CURLcode unit_setup( void )
+static CURLcode unit_setup(void)
 {
   int rc;
   data = curl_easy_init();
@@ -60,7 +60,7 @@ static CURLcode unit_setup( void )
   return CURLE_OK;
 }
 
-static void unit_stop( void )
+static void unit_stop(void)
 {
   if(data_node) {
     Curl_freeaddrinfo(data_node->addr);
index 89f49832f0fae4fc2c2ba62e36eae3978dab6a57..5764622745443e4d7319e0310f989ddb2ce95fd8 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -160,7 +160,7 @@ static const struct testcase tests[] = {
   { "****.txt",                 ".txt",                   MATCH },
 
   /* empty string or pattern */
-  { "",                         "",                       MATCH } ,
+  { "",                         "",                       MATCH },
   { "",                         "hello",                  NOMATCH },
   { "file",                     "",                       NOMATCH  },
   { "?",                        "",                       NOMATCH },
@@ -208,12 +208,12 @@ static const struct testcase tests[] = {
   { "",                         "",                       MATCH }
 };
 
-static CURLcode unit_setup( void )
+static CURLcode unit_setup(void)
 {
   return CURLE_OK;
 }
 
-static void unit_stop( void )
+static void unit_stop(void)
 {
 }
 
index 37e8e49de85fce646ca7bdcdd8083380caba577c..539433ca03e82aeee991507d7a8af3e8c78d0eab 100644 (file)
@@ -28,7 +28,7 @@ static CURLcode unit_setup(void)
   return CURLE_OK;
 }
 
-static void unit_stop( void )
+static void unit_stop(void)
 {
   /* done before shutting down and exiting */
 }
@@ -51,14 +51,14 @@ fail_unless(Curl_cert_hostcheck("f*.example.com", "foo.example.com"),
 fail_unless(Curl_cert_hostcheck("192.168.0.0", "192.168.0.0"),
             "good 5");
 
-fail_if(Curl_cert_hostcheck("xxx.example.com", "www.example.com"), "bad 1" );
-fail_if(Curl_cert_hostcheck("*", "www.example.com"), "bad 2" );
-fail_if(Curl_cert_hostcheck("*.*.com", "www.example.com"), "bad 3" );
-fail_if(Curl_cert_hostcheck("*.example.com", "baa.foo.example.com"), "bad 4" );
-fail_if(Curl_cert_hostcheck("f*.example.com", "baa.example.com"), "bad 5" );
-fail_if(Curl_cert_hostcheck("*.com", "example.com"), "bad 6" );
-fail_if(Curl_cert_hostcheck("*fail.com", "example.com"), "bad 7" );
-fail_if(Curl_cert_hostcheck("*.example.", "www.example."), "bad 8" );
+fail_if(Curl_cert_hostcheck("xxx.example.com", "www.example.com"), "bad 1");
+fail_if(Curl_cert_hostcheck("*", "www.example.com"), "bad 2");
+fail_if(Curl_cert_hostcheck("*.*.com", "www.example.com"), "bad 3");
+fail_if(Curl_cert_hostcheck("*.example.com", "baa.foo.example.com"), "bad 4");
+fail_if(Curl_cert_hostcheck("f*.example.com", "baa.example.com"), "bad 5");
+fail_if(Curl_cert_hostcheck("*.com", "example.com"), "bad 6");
+fail_if(Curl_cert_hostcheck("*fail.com", "example.com"), "bad 7");
+fail_if(Curl_cert_hostcheck("*.example.", "www.example."), "bad 8");
 fail_if(Curl_cert_hostcheck("*.example.", "www.example"), "bad 9");
 fail_if(Curl_cert_hostcheck("", "www"), "bad 10");
 fail_if(Curl_cert_hostcheck("*", "www"), "bad 11");
index e9cc6753c2943ceb96be61a4d3b9ab4f29c32201..9491c46c582a1c92440b281034f045d362d4340a 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -23,8 +23,8 @@
 
 #include "curl/mprintf.h"
 
-static CURLcode unit_setup( void ) {return CURLE_OK;}
-static void unit_stop( void ) {}
+static CURLcode unit_setup(void) {return CURLE_OK;}
+static void unit_stop(void) {}
 
 UNITTEST_START
 
@@ -38,54 +38,54 @@ char output[24];
 
 /* without a trailing zero */
 rc = curl_msnprintf(output, 4, "%.*s", width, buf);
-fail_unless( rc == 3 , "return code should be 3" );
+fail_unless(rc == 3, "return code should be 3");
 fail_unless(!strcmp(output, "bug"), "wrong output");
 
 /* with a trailing zero */
 rc = curl_msnprintf(output, 4, "%.*s", width, str);
-fail_unless( rc == 3 , "return code should be 3" );
+fail_unless(rc == 3, "return code should be 3");
 fail_unless(!strcmp(output, "bug"), "wrong output");
 
 width = 2;
 /* one byte less */
 rc = curl_msnprintf(output, 4, "%.*s", width, buf);
-fail_unless( rc == 2 , "return code should be 2" );
+fail_unless(rc == 2, "return code should be 2");
 fail_unless(!strcmp(output, "bu"), "wrong output");
 
 /* string with larger precision */
 rc = curl_msnprintf(output, 8, "%.8s", str);
-fail_unless( rc == 3 , "return code should be 3" );
+fail_unless(rc == 3, "return code should be 3");
 fail_unless(!strcmp(output, "bug"), "wrong output");
 
 /* longer string with precision */
 rc = curl_msnprintf(output, 8, "%.3s", "0123456789");
-fail_unless( rc == 3 , "return code should be 3" );
+fail_unless(rc == 3, "return code should be 3");
 fail_unless(!strcmp(output, "012"), "wrong output");
 
 /* negative width */
 rc = curl_msnprintf(output, 8, "%-8s", str);
-fail_unless( rc == 8 , "return code should be 8" );
+fail_unless(rc == 8, "return code should be 8");
 fail_unless(!strcmp(output, "bug    "), "wrong output");
 
 /* larger width that string length */
 rc = curl_msnprintf(output, 8, "%8s", str);
-fail_unless( rc == 8 , "return code should be 8" );
+fail_unless(rc == 8, "return code should be 8");
 fail_unless(!strcmp(output, "     bu"), "wrong output");
 
 /* output a number in a limited output */
 rc = curl_msnprintf(output, 4, "%d", 10240);
 /* TODO: this should return 5 to be POSIX/snprintf compliant! */
-fail_unless( rc == 4 , "return code should be 4" );
+fail_unless(rc == 4, "return code should be 4");
 fail_unless(!strcmp(output, "102"), "wrong output");
 
 /* padded strings */
 rc = curl_msnprintf(output, 16, "%8s%8s", str, str);
-fail_unless( rc == 16 , "return code should be 16" );
+fail_unless(rc == 16, "return code should be 16");
 fail_unless(!strcmp(output, "     bug     bu"), "wrong output");
 
 /* padded numbers */
 rc = curl_msnprintf(output, 16, "%8d%8d", 1234, 5678);
-fail_unless( rc == 16 , "return code should be 16" );
+fail_unless(rc == 16, "return code should be 16");
 fail_unless(!strcmp(output, "    1234    567"), "wrong output");
 
 UNITTEST_STOP
index 0d56f9cd93608660d95574c300b83f16b54e6384..c67c0a555455838c7bb75446b3ce65c31ede0d84 100644 (file)
@@ -36,13 +36,13 @@ static void mydtor(void *p)
   free(ptr);
 }
 
-static CURLcode unit_setup( void )
+static CURLcode unit_setup(void)
 {
   return Curl_hash_init(&hash_static, 7, Curl_hash_str,
                         Curl_str_key_compare, mydtor);
 }
 
-static void unit_stop( void )
+static void unit_stop(void)
 {
   Curl_hash_destroy(&hash_static);
 }
index ffcd756e224fc1912d836e5494ff7a64d399e18e..c20b20b0e704de8e4b2156ed5f99e4bb70006084 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2015 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -37,13 +37,13 @@ static void mydtor(void *p)
  (void)p; /* unused */
 }
 
-static CURLcode unit_setup( void )
+static CURLcode unit_setup(void)
 {
   return Curl_hash_init(&hash_static, slots, Curl_hash_str,
                         Curl_str_key_compare, mydtor);
 }
 
-static void unit_stop( void )
+static void unit_stop(void)
 {
   Curl_hash_destroy(&hash_static);
 }