]> granicus.if.org Git - curl/commitdiff
whitespace cleanup: no space first in conditionals
authorDaniel Stenberg <daniel@haxx.se>
Fri, 22 Apr 2011 21:01:30 +0000 (23:01 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 27 Apr 2011 07:09:35 +0000 (09:09 +0200)
"if(a)" is our style, not "if( a )"

21 files changed:
lib/asyn-ares.c
lib/connect.c
lib/cookie.c
lib/easy.c
lib/file.c
lib/formdata.c
lib/ftp.c
lib/gtls.c
lib/hostip.c
lib/http.c
lib/http_chunks.c
lib/http_negotiate.c
lib/http_negotiate_sspi.c
lib/mprintf.c
lib/multi.c
lib/pop3.c
lib/speedcheck.c
lib/tftp.c
lib/transfer.c
lib/url.c
lib/urldata.h

index 308ebdc4fe9976305e1336df209461b3dc644568..5710400bca090a5a9bdcbe3c1dd017ed4f69fec4 100644 (file)
@@ -188,7 +188,7 @@ static void destroy_async_data (struct Curl_async *async);
  */
 void Curl_resolver_cancel(struct connectdata *conn)
 {
-  if( conn && conn->data && conn->data->state.resolver )
+  if(conn && conn->data && conn->data->state.resolver)
     ares_cancel((ares_channel)conn->data->state.resolver);
   destroy_async_data(&conn->async);
 }
@@ -203,8 +203,8 @@ static void destroy_async_data (struct Curl_async *async)
 
   if(async->os_specific) {
     struct ResolverResults *res = (struct ResolverResults *)async->os_specific;
-    if( res ) {
-      if( res->temp_ai ) {
+    if(res) {
+      if(res->temp_ai) {
         Curl_freeaddrinfo(res->temp_ai);
         res->temp_ai = NULL;
       }
@@ -329,7 +329,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
 
   waitperform(conn, 0);
 
-  if( res && !res->num_pending ) {
+  if(res && !res->num_pending) {
     (void)Curl_addrinfo_callback(conn, res->last_status, res->temp_ai);
     /* temp_ai ownership is moved to the connection, so we need not free-up
        them */
@@ -465,7 +465,7 @@ static void compound_results(struct ResolverResults *res,
     return;
   ai_tail = ai;
 
-  while (ai_tail->ai_next)
+  while(ai_tail->ai_next)
     ai_tail = ai_tail->ai_next;
 
   /* Add the new results to the list of old results. */
@@ -507,7 +507,7 @@ static void query_completed_cb(void *arg,  /* (struct connectdata *) */
     }
   }
   /* A successful result overwrites any previous error */
-  if( res->last_status != ARES_SUCCESS )
+  if(res->last_status != ARES_SUCCESS)
     res->last_status = status;
 }
 
@@ -573,7 +573,7 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
     conn->async.status = 0;     /* clear */
     conn->async.dns = NULL;     /* clear */
     res = (struct ResolverResults *)calloc(sizeof(struct ResolverResults),1);
-    if( !res ) {
+    if(!res) {
       Curl_safefree(conn->async.hostname);
       conn->async.hostname = NULL;
       return NULL;
@@ -587,10 +587,10 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
       res->num_pending = 2;
 
       /* areschannel is already setup in the Curl_open() function */
-      ares_gethostbyname((ares_channel)data->state.resolver, hostname, PF_INET,
-                         query_completed_cb, conn);
-      ares_gethostbyname((ares_channel)data->state.resolver, hostname, PF_INET6,
-                         query_completed_cb, conn);
+      ares_gethostbyname((ares_channel)data->state.resolver, hostname,
+                         PF_INET, query_completed_cb, conn);
+      ares_gethostbyname((ares_channel)data->state.resolver, hostname,
+                         PF_INET6, query_completed_cb, conn);
     }
     else
 #endif /* CURLRES_IPV6 */
index f815d4363460c645b3024706e9bfb745bcc4f9dd..2cd8cd39cc21db69fc9a410436d97899f0d203c5 100644 (file)
@@ -372,14 +372,14 @@ static CURLcode bindlocal(struct connectdata *conn,
   else {
     /* no device was given, prepare sa to match af's needs */
 #ifdef ENABLE_IPV6
-    if( af == AF_INET6 ) {
+    if(af == AF_INET6) {
       si6->sin6_family = AF_INET6;
       si6->sin6_port = htons(port);
       sizeof_sa = sizeof(struct sockaddr_in6);
     }
     else
 #endif
-    if( af == AF_INET ) {
+    if(af == AF_INET) {
       si4->sin_family = AF_INET;
       si4->sin_port = htons(port);
       sizeof_sa = sizeof(struct sockaddr_in);
@@ -387,7 +387,7 @@ static CURLcode bindlocal(struct connectdata *conn,
   }
 
   for(;;) {
-    if( bind(sockfd, sock, sizeof_sa) >= 0) {
+    if(bind(sockfd, sock, sizeof_sa) >= 0) {
       /* we succeeded to bind */
       struct Curl_sockaddr_storage add;
       curl_socklen_t size = sizeof(add);
index cad34acfd80a8aed7ca9db7b0538ea15b1083b4d..7928be7dc2419b3c42f2fc8d5c6418f0bd15bdd6 100644 (file)
@@ -373,8 +373,8 @@ Curl_cookie_add(struct SessionHandle *data,
                non-session cookie */
             if(co->expires == 0)
               co->expires = 1;
-            else if( co->expires < 0 )
-                co->expires = 0;
+            else if(co->expires < 0)
+              co->expires = 0;
           }
           else if(!co->name) {
             co->name = strdup(name);
@@ -819,8 +819,8 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
     /* only process this cookie if it is not expired or had no expire
        date AND that if the cookie requires we're secure we must only
        continue if we are! */
-    if( (!co->expires || (co->expires > now)) &&
-        (co->secure?secure:TRUE) ) {
+    if((!co->expires || (co->expires > now)) &&
+       (co->secure?secure:TRUE)) {
 
       /* now check if the domain is correct */
       if(!co->domain ||
index 8b1386940a645e357d62be047475bc3a6d9e2bcf..9cb275b1a2d1ede43a047cdbbc7527e72e4ac85b 100644 (file)
@@ -133,8 +133,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. */
@@ -305,7 +305,7 @@ CURLcode curl_global_init_mem(long flags, curl_malloc_callback m,
     return CURLE_FAILED_INIT;
 
   /* Already initialized, don't do it again */
-  if( initialized )
+  if(initialized)
     return CURLE_OK;
 
   /* Call the actual init function first */
@@ -506,7 +506,7 @@ CURLcode curl_easy_perform(CURL *curl)
   if(!data)
     return CURLE_BAD_FUNCTION_ARGUMENT;
 
-  if( ! (data->share && data->share->hostcache) ) {
+  if(! (data->share && data->share->hostcache)) {
     /* this handle is not using a shared dns cache */
 
     if(data->set.global_dns_cache &&
@@ -673,8 +673,8 @@ CURL *curl_easy_duphandle(CURL *incurl)
   }
 
   /* Clone the resolver handle, if present, for the new handle */
-  if( Curl_resolver_duphandle(&outcurl->state.resolver,
-                              data->state.resolver) != CURLE_OK )
+  if(Curl_resolver_duphandle(&outcurl->state.resolver,
+                             data->state.resolver) != CURLE_OK)
     goto fail;
 
   Curl_convert_setup(outcurl);
index 1fee92bb202aa9bb2da3342a66f7ca3dfe5101eb..a3d80fbd70025280155fdb6933235fc6211d073d 100644 (file)
@@ -377,7 +377,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;
@@ -456,7 +456,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
   fd = conn->data->state.proto.file->fd;
 
   /* VMS: This only works reliable for STREAMLF files */
-  if( -1 != fstat(fd, &statbuf)) {
+  if(-1 != fstat(fd, &statbuf)) {
     /* we could stat it, then read out the size */
     expected_size = statbuf.st_size;
     /* and store the modification time */
@@ -562,7 +562,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
     bytestoread = (expected_size < BUFSIZE-1)?(size_t)expected_size:BUFSIZE-1;
     nread = read(fd, buf, bytestoread);
 
-    if( nread > 0)
+    if(nread > 0)
       buf[nread] = 0;
 
     if(nread <= 0 || expected_size == 0)
index a94dca521e5173e39ba89b48a9cd91675045466b..a7d2a5f7cd486e3cb119e17c925ac16eea789a5a 100644 (file)
@@ -341,7 +341,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
   while(return_value == CURL_FORMADD_OK) {
 
     /* first see if we have more parts of the array param */
-    if( array_state && forms ) {
+    if(array_state && forms) {
       /* get the upcoming option from the given array */
       option = forms->option;
       array_value = (char *)forms->value;
@@ -598,7 +598,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
           (struct curl_slist*)array_value:
           va_arg(params, struct curl_slist*);
 
-        if( current_form->contentheader )
+        if(current_form->contentheader)
           return_value = CURL_FORMADD_OPTION_TWICE;
         else
           current_form->contentheader = list;
@@ -609,7 +609,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
       {
         const char *filename = array_state?array_value:
           va_arg(params, char *);
-        if( current_form->showfilename )
+        if(current_form->showfilename)
           return_value = CURL_FORMADD_OPTION_TWICE;
         else {
           current_form->showfilename = strdup(filename);
@@ -633,26 +633,26 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
     for(form = first_form;
         form != NULL;
         form = form->more) {
-      if( ((!form->name || !form->value) && !post) ||
-          ( (form->contentslength) &&
-            (form->flags & HTTPPOST_FILENAME) ) ||
-          ( (form->flags & HTTPPOST_FILENAME) &&
-            (form->flags & HTTPPOST_PTRCONTENTS) ) ||
-
-          ( (!form->buffer) &&
-            (form->flags & HTTPPOST_BUFFER) &&
-            (form->flags & HTTPPOST_PTRBUFFER) ) ||
-
-          ( (form->flags & HTTPPOST_READFILE) &&
-            (form->flags & HTTPPOST_PTRCONTENTS) )
+      if(((!form->name || !form->value) && !post) ||
+         ( (form->contentslength) &&
+           (form->flags & HTTPPOST_FILENAME) ) ||
+         ( (form->flags & HTTPPOST_FILENAME) &&
+           (form->flags & HTTPPOST_PTRCONTENTS) ) ||
+
+         ( (!form->buffer) &&
+           (form->flags & HTTPPOST_BUFFER) &&
+           (form->flags & HTTPPOST_PTRBUFFER) ) ||
+
+         ( (form->flags & HTTPPOST_READFILE) &&
+           (form->flags & HTTPPOST_PTRCONTENTS) )
         ) {
         return_value = CURL_FORMADD_INCOMPLETE;
         break;
       }
       else {
-        if( ((form->flags & HTTPPOST_FILENAME) ||
-              (form->flags & HTTPPOST_BUFFER)) &&
-             !form->contenttype ) {
+        if(((form->flags & HTTPPOST_FILENAME) ||
+            (form->flags & HTTPPOST_BUFFER)) &&
+           !form->contenttype ) {
           /* our contenttype is missing */
           form->contenttype
             = strdup(ContentTypeForFilename(form->value, prevtype));
@@ -662,8 +662,8 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
           }
           form->contenttype_alloc = TRUE;
         }
-        if( !(form->flags & HTTPPOST_PTRNAME) &&
-             (form == first_form) ) {
+        if(!(form->flags & HTTPPOST_PTRNAME) &&
+           (form == first_form) ) {
           /* Note that there's small risk that form->name is NULL here if the
              app passed in a bad combo, so we better check for that first. */
           if(form->name)
@@ -675,9 +675,9 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
           }
           form->name_alloc = TRUE;
         }
-        if( !(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
-                             HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
-                             HTTPPOST_CALLBACK)) ) {
+        if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
+                            HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
+                            HTTPPOST_CALLBACK)) ) {
           /* copy value (without strdup; possibly contains null characters) */
           form->value = memdup(form->value, form->contentslength);
           if(!form->value) {
@@ -919,10 +919,10 @@ void curl_formfree(struct curl_httppost *form)
     if(form->more)
       curl_formfree(form->more);
 
-    if( !(form->flags & HTTPPOST_PTRNAME) && form->name)
+    if(!(form->flags & HTTPPOST_PTRNAME) && form->name)
       free(form->name); /* free the name */
-    if( !(form->flags & (HTTPPOST_PTRCONTENTS|HTTPPOST_CALLBACK)) &&
-        form->contents)
+    if(!(form->flags & (HTTPPOST_PTRCONTENTS|HTTPPOST_CALLBACK)) &&
+       form->contents)
       free(form->contents); /* free the contents */
     if(form->contenttype)
       free(form->contenttype); /* free the content type */
@@ -1154,7 +1154,7 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
       }
 
       curList = file->contentheader;
-      while( curList ) {
+      while(curList) {
         /* Process the additional headers specified for this form */
         result = AddFormDataf( &form, &size, "\r\n%s", curList->data );
         if(result)
@@ -1350,7 +1350,7 @@ 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,
              wantedsize - gotsize);
index e8a6a315656cb7885e7f4283f042fa41bde1424e..38ec8e9d0f13bc9410d78ffcb4788ba5f071ca78 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -753,11 +753,11 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
     }
     else
 #endif
-      if( *string_ftpport == ':') {
+      if(*string_ftpport == ':') {
         /* :port */
         ip_end = string_ftpport;
     }
-    else if( (ip_end = strchr(string_ftpport, ':')) != NULL) {
+    else if((ip_end = strchr(string_ftpport, ':')) != NULL) {
         /* either ipv6 or (ipv4|domain|interface):port(-range) */
 #ifdef ENABLE_IPV6
       if(Curl_inet_pton(AF_INET6, string_ftpport, sa6) == 1) {
@@ -776,7 +776,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
       strcpy(addr, string_ftpport);
 
     /* parse the port */
-    if( ip_end != NULL ) {
+    if(ip_end != NULL) {
       if((port_start = strchr(ip_end, ':')) != NULL) {
         port_min = curlx_ultous(strtoul(port_start+1, NULL, 10));
         if((port_sep = strchr(port_start, '-')) != NULL) {
@@ -884,8 +884,8 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
   memcpy(sa, ai->ai_addr, ai->ai_addrlen);
   sslen = ai->ai_addrlen;
 
-  for( port = port_min; port <= port_max; ) {
-    if( sa->sa_family == AF_INET )
+  for(port = port_min; port <= port_max;) {
+    if(sa->sa_family == AF_INET)
       sa4->sin_port = htons(port);
 #ifdef ENABLE_IPV6
     else
@@ -2112,7 +2112,7 @@ static CURLcode ftp_state_stor_resp(struct connectdata *conn,
     /* BLOCKING */
     /* PORT means we are now awaiting the server to connect to us. */
     result = AllowServerConnect(conn);
-    if( result )
+    if(result)
       return result;
   }
 
@@ -2226,7 +2226,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
     if(data->set.ftp_use_port) {
       /* BLOCKING */
       result = AllowServerConnect(conn);
-      if( result )
+      if(result)
         return result;
     }
 
index 1a2dfd467262ac12c05e9e55d1631431dfefd822..32d81d46bf81f16a68832ba529c1732fcf1553c2 100644 (file)
@@ -443,13 +443,13 @@ gtls_connect_step1(struct connectdata *conn,
     return CURLE_SSL_CONNECT_ERROR;
 
   if(data->set.str[STRING_CERT]) {
-    if( gnutls_certificate_set_x509_key_file(
-          conn->ssl[sockindex].cred,
-          data->set.str[STRING_CERT],
-          data->set.str[STRING_KEY] ?
-          data->set.str[STRING_KEY] : data->set.str[STRING_CERT],
-          do_file_type(data->set.str[STRING_CERT_TYPE]) ) !=
-        GNUTLS_E_SUCCESS) {
+    if(gnutls_certificate_set_x509_key_file(
+         conn->ssl[sockindex].cred,
+         data->set.str[STRING_CERT],
+         data->set.str[STRING_KEY] ?
+         data->set.str[STRING_KEY] : data->set.str[STRING_CERT],
+         do_file_type(data->set.str[STRING_CERT_TYPE]) ) !=
+       GNUTLS_E_SUCCESS) {
       failf(data, "error reading X.509 key or certificate file");
       return CURLE_SSL_CONNECT_ERROR;
     }
index 387cf285023865c55475109fb5c0351113776298..084ee86acafa5c201abf946f5533e608e2f68acc 100644 (file)
@@ -290,7 +290,7 @@ remove_entry_if_stale(struct SessionHandle *data, struct Curl_dns_entry *dns)
 {
   struct hostcache_prune_data user;
 
-  if( !dns || (data->set.dns_cache_timeout == -1) || !data->dns.hostcache)
+  if(!dns || (data->set.dns_cache_timeout == -1) || !data->dns.hostcache)
     /* cache forever means never prune, and NULL hostcache means
        we can't do it */
     return 0;
@@ -298,7 +298,7 @@ remove_entry_if_stale(struct SessionHandle *data, struct Curl_dns_entry *dns)
   time(&user.now);
   user.cache_timeout = data->set.dns_cache_timeout;
 
-  if( !hostcache_timestamp_remove(&user,dns) )
+  if(!hostcache_timestamp_remove(&user,dns) )
     return 0;
 
   Curl_hash_clean_with_criterium(data->dns.hostcache,
@@ -428,7 +428,7 @@ int Curl_resolv(struct connectdata *conn,
   free(entry_id);
 
   /* See whether the returned entry is stale. Done before we release lock */
-  if( remove_entry_if_stale(data, dns) )
+  if(remove_entry_if_stale(data, dns))
     dns = NULL; /* the memory deallocation is being handled by the hash */
 
   if(dns) {
index 087c5ddcbe3a2812cc7e58f65357e8a7952446f3..0f7ad14cf4c7cde79b7e687b20950b7f0c2b4a1b 100644 (file)
@@ -1657,8 +1657,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
       return CURLE_OUT_OF_MEMORY;
   }
 
-  if( (conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_FTP)) &&
-      data->set.upload) {
+  if((conn->handler->protocol&(CURLPROTO_HTTP|CURLPROTO_FTP)) &&
+     data->set.upload) {
     httpreq = HTTPREQ_PUT;
   }
 
index 821a861f4b4bc19c3482ce538f28d403a0295dc0..93de1d9688ed7fa6133a7d223db0276a7e5da6a6 100644 (file)
@@ -212,7 +212,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
       case IDENTITY:
 #endif
         if(!k->ignorebody) {
-          if( !data->set.http_te_skip )
+          if(!data->set.http_te_skip)
             result = Curl_client_write(conn, CLIENTWRITE_BODY, datap,
                                        piece);
           else
index 6f9c109c6068266b60d4947f9f6d1b33808d088e..202d69ecc72ac57b857f6af20092f1713efdc996 100644 (file)
@@ -290,7 +290,7 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
     size_t          responseTokenLength = 0;
 
     responseToken = malloc(neg_ctx->output_token.length);
-    if( responseToken == NULL)
+    if(responseToken == NULL)
       return CURLE_OUT_OF_MEMORY;
     memcpy(responseToken, neg_ctx->output_token.value,
            neg_ctx->output_token.length);
index 7e431965bc81c3ca29ec5aece76907dd96717886..6b3be317b6ed447d8a9eee3a12793d6b7742d723 100644 (file)
@@ -171,7 +171,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
     neg_ctx->credentials = (CredHandle *)malloc(sizeof(CredHandle));
     neg_ctx->context = (CtxtHandle *)malloc(sizeof(CtxtHandle));
 
-    if( !neg_ctx->credentials || !neg_ctx->context)
+    if(!neg_ctx->credentials || !neg_ctx->context)
       return -1;
 
     neg_ctx->status =
@@ -179,7 +179,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
                                          SECPKG_CRED_OUTBOUND, NULL, NULL,
                                          NULL, NULL, neg_ctx->credentials,
                                          &lifetime);
-    if( neg_ctx->status != SEC_E_OK )
+    if(neg_ctx->status != SEC_E_OK)
       return -1;
   }
 
@@ -217,14 +217,14 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
     &context_attributes,
     &lifetime);
 
-  if( GSS_ERROR(neg_ctx->status) )
+  if(GSS_ERROR(neg_ctx->status))
     return -1;
 
-  if( neg_ctx->status == SEC_I_COMPLETE_NEEDED ||
-       neg_ctx->status == SEC_I_COMPLETE_AND_CONTINUE ) {
+  if(neg_ctx->status == SEC_I_COMPLETE_NEEDED ||
+     neg_ctx->status == SEC_I_COMPLETE_AND_CONTINUE) {
     neg_ctx->status = s_pSecFn->CompleteAuthToken(neg_ctx->context,
                                                   &out_buff_desc);
-    if( GSS_ERROR(neg_ctx->status) )
+    if(GSS_ERROR(neg_ctx->status))
       return -1;
   }
 
index ca8e7ff2ab055e6ee74411649ba0ec0861f19573..dd7a1e09b218d8d5066abd94fd7d7175352d2100 100644 (file)
@@ -851,7 +851,7 @@ static int dprintf_formatf(
         size_t len;
 
         str = (char *) p->data.str;
-        if( str == NULL) {
+        if(str == NULL) {
           /* Write null[] if there's space.  */
           if(prec == -1 || prec >= (long) sizeof(null) - 1) {
             str = null;
index 89e6ed74c870642b0d2d3a4f9a0935affcdfd600..9b707abc4e9888b9b7dd120fd2703104331220e9 100644 (file)
@@ -1415,17 +1415,17 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
     case CURLM_STATE_TOOFAST: /* limit-rate exceeded in either direction */
       /* if both rates are within spec, resume transfer */
       Curl_pgrsUpdate(easy->easy_conn);
-      if( ( (data->set.max_send_speed == 0) ||
-            (data->progress.ulspeed < data->set.max_send_speed ))  &&
-          ( (data->set.max_recv_speed == 0) ||
-            (data->progress.dlspeed < data->set.max_recv_speed) ) )
+      if(( (data->set.max_send_speed == 0) ||
+           (data->progress.ulspeed < data->set.max_send_speed ))  &&
+         ( (data->set.max_recv_speed == 0) ||
+           (data->progress.dlspeed < data->set.max_recv_speed)))
         multistate(easy, CURLM_STATE_PERFORM);
       break;
 
     case CURLM_STATE_PERFORM:
       /* check if over send speed */
-      if( (data->set.max_send_speed > 0) &&
-          (data->progress.ulspeed > data->set.max_send_speed) ) {
+      if((data->set.max_send_speed > 0) &&
+         (data->progress.ulspeed > data->set.max_send_speed)) {
         int buffersize;
 
         multistate(easy, CURLM_STATE_TOOFAST);
@@ -1440,8 +1440,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       }
 
       /* check if over recv speed */
-      if( (data->set.max_recv_speed > 0) &&
-          (data->progress.dlspeed > data->set.max_recv_speed) ) {
+      if((data->set.max_recv_speed > 0) &&
+         (data->progress.dlspeed > data->set.max_recv_speed)) {
         int buffersize;
 
         multistate(easy, CURLM_STATE_TOOFAST);
@@ -1744,7 +1744,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
 
   *running_handles = multi->num_alive;
 
-  if( CURLM_OK >= returncode )
+  if(CURLM_OK >= returncode)
     update_timer(multi);
 
   return returncode;
@@ -2327,7 +2327,7 @@ static int update_timer(struct Curl_multi *multi)
   if(multi_timeout(multi, &timeout_ms)) {
     return -1;
   }
-  if( timeout_ms < 0 ) {
+  if(timeout_ms < 0) {
     static const struct timeval none={0,0};
     if(Curl_splaycomparekeys(none, multi->timer_lastcall)) {
       multi->timer_lastcall = none;
index e4fd03b4530520205552c5e020426cb80bbce698..6d5afa876281855d8b1a0886edc07aa0c0ea0e21 100644 (file)
@@ -214,8 +214,8 @@ static int pop3_endofresp(struct pingpong *pp,
   char *line = pp->linestart_resp;
   size_t len = pp->nread_resp;
 
-  if( ((len >= 3) && !memcmp("+OK", line, 3)) ||
-      ((len >= 4) && !memcmp("-ERR", line, 4)) ) {
+  if(((len >= 3) && !memcmp("+OK", line, 3)) ||
+     ((len >= 4) && !memcmp("-ERR", line, 4))) {
     *resp=line[1]; /* O or E */
     return TRUE;
   }
index a43acb3f0ac407e048898a9183411ed9c4aa9c72..56ac34aef4f158b90dfc7f925ef0fd9990f606eb 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, 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
@@ -49,7 +49,7 @@ CURLcode Curl_speedcheck(struct SessionHandle *data,
        for "low speed time" seconds we consider that enough reason
        to abort the download. */
 
-    if( (howlong/1000) > data->set.low_speed_time) {
+    if((howlong/1000) > data->set.low_speed_time) {
       /* we have been this slow for long enough, now die */
       failf(data,
             "Operation too slow. "
index d33d33b1cacef414fe044eb669b9ac1ba6c5c90a..d753d6d5a640d5254919aede41b16bdd54f5ef12 100644 (file)
@@ -421,7 +421,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 );
index 41f0de4ed77db2387b9d3badf04ffd299b66d86a..fad003c6ee37732e71331657523284a08682b338 100644 (file)
@@ -1913,9 +1913,9 @@ CURLcode Curl_follow(struct SessionHandle *data,
      *
      * This behaviour can be overridden with CURLOPT_POSTREDIR.
      */
-    if( (data->set.httpreq == HTTPREQ_POST
-         || data->set.httpreq == HTTPREQ_POST_FORM)
-        && !data->set.post301) {
+    if((data->set.httpreq == HTTPREQ_POST
+        || data->set.httpreq == HTTPREQ_POST_FORM)
+       && !data->set.post301) {
       infof(data,
             "Violate RFC 2616/10.3.2 and switch from POST to GET\n");
       data->set.httpreq = HTTPREQ_GET;
@@ -1941,9 +1941,9 @@ CURLcode Curl_follow(struct SessionHandle *data,
 
     This behaviour can be overriden with CURLOPT_POSTREDIR
     */
-    if( (data->set.httpreq == HTTPREQ_POST
-         || data->set.httpreq == HTTPREQ_POST_FORM)
-        && !data->set.post302) {
+    if((data->set.httpreq == HTTPREQ_POST
+        || data->set.httpreq == HTTPREQ_POST_FORM)
+       && !data->set.post302) {
       infof(data,
             "Violate RFC 2616/10.3.3 and switch from POST to GET\n");
       data->set.httpreq = HTTPREQ_GET;
index d8642e31bad3f1178064fa9f7a85cc225d0c3e57..16c871df37f61dc104a42a02097f292311746ff9 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -4447,8 +4447,8 @@ static CURLcode set_userpass(struct connectdata *conn,
                              const char *user, const char *passwd)
 {
   /* If our protocol needs a password and we have none, use the defaults */
-  if( (conn->handler->protocol & (CURLPROTO_FTP|CURLPROTO_IMAP)) &&
-       !conn->bits.user_passwd) {
+  if((conn->handler->protocol & (CURLPROTO_FTP|CURLPROTO_IMAP)) &&
+     !conn->bits.user_passwd) {
 
     conn->user = strdup(CURL_DEFAULT_USER);
     if(conn->user)
index 3067df4f9b85424e3b1434d4e3ea0059b77142d9..d6e126ceb8d2c4d54cce753102a64243c5c32120 100644 (file)
@@ -1143,7 +1143,8 @@ struct UrlState {
 
   bool authproblem; /* TRUE if there's some problem authenticating */
 
-  void *resolver; /* resolver state, if it is used in the URL state - ares_channel f.e. */
+  void *resolver; /* resolver state, if it is used in the URL state -
+                     ares_channel f.e. */
 
 #if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
   ENGINE *engine;