checksrc: use space after comma
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, 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
|
||||
|
@@ -155,6 +155,38 @@ sub scanfile {
|
||||
}
|
||||
}
|
||||
|
||||
# check for comma without space
|
||||
if($l =~ /^(.*),[^ \n]/) {
|
||||
my $pref=$1;
|
||||
my $ign=0;
|
||||
if($pref =~ / *\#/) {
|
||||
# this is a #if, treat it differently
|
||||
$ign=1;
|
||||
}
|
||||
elsif($pref =~ /\/\*/) {
|
||||
# this is a comment
|
||||
$ign=1;
|
||||
}
|
||||
elsif($pref =~ /[\"\']/) {
|
||||
$ign = 1;
|
||||
# There is a quote here, figure out whether the comma is
|
||||
# within a string or '' or not.
|
||||
if($pref =~ /\"/) {
|
||||
# withing a string
|
||||
}
|
||||
elsif($pref =~ /\'$/) {
|
||||
# a single letter
|
||||
}
|
||||
else {
|
||||
$ign = 0;
|
||||
}
|
||||
}
|
||||
if(!$ign) {
|
||||
checkwarn($line, length($pref)+1, $file, $l,
|
||||
"comma without following space");
|
||||
}
|
||||
}
|
||||
|
||||
# check for "} else"
|
||||
if($l =~ /^(.*)\} *else/) {
|
||||
checkwarn($line, length($1), $file, $l, "else after closing brace on same line");
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2009, 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
|
||||
|
@@ -246,7 +246,8 @@ krb5_auth(void *app_data, struct connectdata *conn)
|
||||
result = Curl_base64_encode(data, (char *)output_buffer.value,
|
||||
output_buffer.length, &p, &base64_sz);
|
||||
if(result) {
|
||||
Curl_infof(data,"base64-encoding: %s\n", curl_easy_strerror(result));
|
||||
Curl_infof(data, "base64-encoding: %s\n",
|
||||
curl_easy_strerror(result));
|
||||
ret = AUTH_CONTINUE;
|
||||
break;
|
||||
}
|
||||
@@ -278,7 +279,8 @@ krb5_auth(void *app_data, struct connectdata *conn)
|
||||
(unsigned char **)&_gssresp.value,
|
||||
&_gssresp.length);
|
||||
if(result) {
|
||||
Curl_failf(data,"base64-decoding: %s", curl_easy_strerror(result));
|
||||
Curl_failf(data, "base64-decoding: %s",
|
||||
curl_easy_strerror(result));
|
||||
ret = AUTH_CONTINUE;
|
||||
break;
|
||||
}
|
||||
|
@@ -130,8 +130,8 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);
|
||||
#ifdef HAVE_GETNAMEINFO
|
||||
#undef getnameinfo
|
||||
#define getnameinfo(sa,salen,host,hostlen,serv,servlen,flags) \
|
||||
curl_dogetnameinfo(sa,salen,host,hostlen,serv,servlen,flags, __LINE__, \
|
||||
__FILE__)
|
||||
curl_dogetnameinfo(sa, salen, host, hostlen, serv, servlen, flags, \
|
||||
__LINE__, __FILE__)
|
||||
#endif /* HAVE_GETNAMEINFO */
|
||||
|
||||
#ifdef HAVE_FREEADDRINFO
|
||||
|
@@ -7,7 +7,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
|
||||
|
@@ -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
|
||||
|
@@ -104,8 +104,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
|
||||
service_name = malloc(strlen(service) + strlen(conn->proxy.name) + 2);
|
||||
if(!service_name)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
snprintf(service_name,strlen(service) +strlen(conn->proxy.name)+2,"%s/%s",
|
||||
service,conn->proxy.name);
|
||||
snprintf(service_name, strlen(service) +strlen(conn->proxy.name)+2,
|
||||
"%s/%s", service, conn->proxy.name);
|
||||
}
|
||||
|
||||
input_desc.cBuffers = 1;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1997 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1997 - 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
|
||||
|
@@ -7,7 +7,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
|
||||
|
@@ -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
|
||||
|
12
lib/telnet.c
12
lib/telnet.c
@@ -1343,8 +1343,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
|
||||
/* Grab a pointer to WSACreateEvent */
|
||||
create_event_func = GetProcAddress(wsock2, "WSACreateEvent");
|
||||
if(create_event_func == NULL) {
|
||||
failf(data,"failed to find WSACreateEvent function (%d)",
|
||||
ERRNO);
|
||||
failf(data, "failed to find WSACreateEvent function (%d)", ERRNO);
|
||||
FreeLibrary(wsock2);
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
@@ -1352,8 +1351,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
|
||||
/* And WSACloseEvent */
|
||||
close_event_func = GetProcAddress(wsock2, "WSACloseEvent");
|
||||
if(close_event_func == NULL) {
|
||||
failf(data,"failed to find WSACloseEvent function (%d)",
|
||||
ERRNO);
|
||||
failf(data, "failed to find WSACloseEvent function (%d)", ERRNO);
|
||||
FreeLibrary(wsock2);
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
@@ -1361,8 +1359,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
|
||||
/* And WSAEventSelect */
|
||||
event_select_func = GetProcAddress(wsock2, "WSAEventSelect");
|
||||
if(event_select_func == NULL) {
|
||||
failf(data,"failed to find WSAEventSelect function (%d)",
|
||||
ERRNO);
|
||||
failf(data, "failed to find WSAEventSelect function (%d)", ERRNO);
|
||||
FreeLibrary(wsock2);
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
@@ -1370,8 +1367,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done)
|
||||
/* And WSAEnumNetworkEvents */
|
||||
enum_netevents_func = GetProcAddress(wsock2, "WSAEnumNetworkEvents");
|
||||
if(enum_netevents_func == NULL) {
|
||||
failf(data,"failed to find WSAEnumNetworkEvents function (%d)",
|
||||
ERRNO);
|
||||
failf(data, "failed to find WSAEnumNetworkEvents function (%d)", ERRNO);
|
||||
FreeLibrary(wsock2);
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
@@ -1246,7 +1246,8 @@ static CURLcode verifyhost(struct connectdata *conn, X509 *server_cert)
|
||||
UTF8 etc. */
|
||||
|
||||
if(i>=0) {
|
||||
ASN1_STRING *tmp = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name,i));
|
||||
ASN1_STRING *tmp =
|
||||
X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, i));
|
||||
|
||||
/* In OpenSSL 0.9.7d and earlier, ASN1_STRING_to_UTF8 fails if the input
|
||||
is already UTF-8 encoded. We check for this case and copy the raw
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2013, 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, 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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user