Commit a6b8fe2a authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

checksrc: use space before paren in "return (expr);"

parent 3dbe12a1
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 2011 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 2011 - 2015, 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
@@ -144,6 +144,17 @@ sub scanfile {
            }
        }

        # check for "return(" without space
        if($l =~ /^(.*)return\(/) {
            if($1 =~ / *\#/) {
                # this is a #if, treat it differently
            }
            else {
                checkwarn($line, length($1)+6, $file, $l,
                          "return without space before paren");
            }
        }
        
        # check for "} else"
        if($l =~ /^(.*)\} *else/) {
            checkwarn($line, length($1), $file, $l, "else after closing brace on same line");
+1 −1
Original line number Diff line number Diff line
@@ -4087,7 +4087,7 @@ CURLcode Curl_ftpsendf(struct connectdata *conn,
  result = Curl_convert_to_network(conn->data, s, write_len);
  /* Curl_convert_to_network calls failf if unsuccessful */
  if(result)
    return(result);
    return result;

  for(;;) {
#ifdef HAVE_GSSAPI
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2015, 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
@@ -573,6 +573,6 @@ int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes,

   rc = tpf_select_bsd(maxfds, reads, writes, excepts, tv);
   tpf_process_signals();
   return(rc);
   return rc;
}
#endif /* TPF */
+3 −3
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ static size_t convert_lineends(struct SessionHandle *data,

  /* sanity check */
  if((startPtr == NULL) || (size < 1)) {
    return(size);
    return size;
  }

  if(data->state.prev_block_had_trailing_cr) {
@@ -116,7 +116,7 @@ static size_t convert_lineends(struct SessionHandle *data,

    return (outPtr - startPtr);
  }
  return(size);
  return size;
}
#endif /* CURL_DO_LINEEND_CONV */

+2 −2
Original line number Diff line number Diff line
@@ -92,10 +92,10 @@ static int check_gss_err(struct SessionHandle *data,
      gss_release_buffer(&min_stat, &status_string);
    }
    failf(data, "GSS-API error: %s failed:\n%s", function, buf);
    return(1);
    return 1;
  }

  return(0);
  return 0;
}

CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
Loading