mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 09:21:50 -05:00
checksrc: move open braces to comply with function declaration style
This commit is contained in:
parent
80e7cfeb87
commit
6832c1d4b2
@ -94,7 +94,8 @@ typedef struct _SockInfo {
|
||||
} SockInfo;
|
||||
|
||||
/* Die if we get a bad CURLMcode somewhere */
|
||||
static void mcode_or_die(const char *where, CURLMcode code) {
|
||||
static void mcode_or_die(const char *where, CURLMcode code)
|
||||
{
|
||||
if(CURLM_OK != code) {
|
||||
const char *s;
|
||||
switch (code) {
|
||||
|
@ -48,8 +48,8 @@
|
||||
* For libcurl static library release builds no overriding takes place.
|
||||
*/
|
||||
|
||||
int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) {
|
||||
|
||||
int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen)
|
||||
{
|
||||
#ifndef HAVE_GETHOSTNAME
|
||||
|
||||
/* Allow compilation and return failure when unavailable */
|
||||
|
@ -1427,7 +1427,8 @@ int Curl_FormInit(struct Form *form, struct FormData *formdata)
|
||||
*
|
||||
*/
|
||||
# define fopen_read vmsfopenread
|
||||
static FILE * vmsfopenread(const char *file, const char *mode) {
|
||||
static FILE * vmsfopenread(const char *file, const char *mode)
|
||||
{
|
||||
struct_stat statbuf;
|
||||
int result;
|
||||
|
||||
|
@ -225,7 +225,8 @@ int Curl_http2_ver(char *p, size_t len)
|
||||
https://tools.ietf.org/html/rfc7540#page-77
|
||||
nghttp2_error_code enums are identical.
|
||||
*/
|
||||
const char *Curl_http2_strerror(uint32_t err) {
|
||||
const char *Curl_http2_strerror(uint32_t err)
|
||||
{
|
||||
#ifndef NGHTTP2_HAS_HTTP2_STRERROR
|
||||
const char *str[] = {
|
||||
"NO_ERROR", /* 0x0 */
|
||||
@ -1578,7 +1579,8 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
|
||||
* Parse the tokens as separated by comma and surrounded by whitespace.
|
||||
* Returns TRUE if found or FALSE if not.
|
||||
*/
|
||||
static bool contains_trailers(const char *p, size_t len) {
|
||||
static bool contains_trailers(const char *p, size_t len)
|
||||
{
|
||||
const char *end = p + len;
|
||||
for(;;) {
|
||||
for(; p != end && (*p == ' ' || *p == '\t'); ++p)
|
||||
|
@ -88,7 +88,8 @@ name_to_level(const char *name)
|
||||
|
||||
/* Convert a protocol |level| to its char representation.
|
||||
We take an int to catch programming mistakes. */
|
||||
static char level_to_char(int level) {
|
||||
static char level_to_char(int level)
|
||||
{
|
||||
switch(level) {
|
||||
case PROT_CLEAR:
|
||||
return 'C';
|
||||
|
@ -138,8 +138,8 @@ static char *vms_getenv(const char *envvar)
|
||||
|
||||
static struct passwd vms_passwd_cache;
|
||||
|
||||
static struct passwd * vms_getpwuid(uid_t uid) {
|
||||
|
||||
static struct passwd * vms_getpwuid(uid_t uid)
|
||||
{
|
||||
struct passwd * my_passwd;
|
||||
|
||||
/* Hack needed to support 64 bit builds, decc_getpwnam is 32 bit only */
|
||||
@ -171,7 +171,7 @@ char *unix_path;
|
||||
}
|
||||
|
||||
/* Need to copy the structure returned */
|
||||
/* Since curl is only using pw_dir, no need to fix up *
|
||||
/* Since curl is only using pw_dir, no need to fix up */
|
||||
/* the pw_shell when running under Bash */
|
||||
vms_passwd_cache.pw_name = my_passwd->pw_name;
|
||||
vms_passwd_cache.pw_uid = my_passwd->pw_uid;
|
||||
|
@ -219,7 +219,8 @@ static OSStatus SocketWrite(SSLConnectionRef connection,
|
||||
return ortn;
|
||||
}
|
||||
|
||||
CF_INLINE const char *SSLCipherNameForNumber(SSLCipherSuite cipher) {
|
||||
CF_INLINE const char *SSLCipherNameForNumber(SSLCipherSuite cipher)
|
||||
{
|
||||
switch (cipher) {
|
||||
/* SSL version 3.0 */
|
||||
case SSL_RSA_WITH_NULL_MD5:
|
||||
@ -364,7 +365,8 @@ CF_INLINE const char *SSLCipherNameForNumber(SSLCipherSuite cipher) {
|
||||
return "SSL_NULL_WITH_NULL_NULL";
|
||||
}
|
||||
|
||||
CF_INLINE const char *TLSCipherNameForNumber(SSLCipherSuite cipher) {
|
||||
CF_INLINE const char *TLSCipherNameForNumber(SSLCipherSuite cipher)
|
||||
{
|
||||
switch(cipher) {
|
||||
/* TLS 1.0 with AES (RFC 3268) */
|
||||
case TLS_RSA_WITH_AES_128_CBC_SHA:
|
||||
@ -2449,7 +2451,8 @@ void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
|
||||
(void)CC_MD5(tmp, (CC_LONG)tmplen, md5sum);
|
||||
}
|
||||
|
||||
bool Curl_darwinssl_false_start(void) {
|
||||
bool Curl_darwinssl_false_start(void)
|
||||
{
|
||||
#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
|
||||
if(SSLSetSessionOption != NULL)
|
||||
return TRUE;
|
||||
|
@ -261,7 +261,8 @@ out:
|
||||
return loaded_file;
|
||||
}
|
||||
|
||||
static void unload_file(gnutls_datum_t data) {
|
||||
static void unload_file(gnutls_datum_t data)
|
||||
{
|
||||
free(data.data);
|
||||
}
|
||||
|
||||
|
@ -2181,7 +2181,8 @@ bool Curl_nss_cert_status_request(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Curl_nss_false_start(void) {
|
||||
bool Curl_nss_false_start(void)
|
||||
{
|
||||
#if NSSVERNUM >= 0x030f04 /* 3.15.4 */
|
||||
return TRUE;
|
||||
#else
|
||||
|
@ -182,7 +182,8 @@ static bool ssl_prefs_check(struct Curl_easy *data)
|
||||
}
|
||||
|
||||
static CURLcode
|
||||
ssl_connect_init_proxy(struct connectdata *conn, int sockindex) {
|
||||
ssl_connect_init_proxy(struct connectdata *conn, int sockindex)
|
||||
{
|
||||
DEBUGASSERT(conn->bits.proxy_ssl_connected[sockindex]);
|
||||
if(ssl_connection_complete == conn->ssl[sockindex].state &&
|
||||
!conn->proxy_ssl[sockindex].use) {
|
||||
|
@ -50,7 +50,8 @@ static const char *RTP_DATA = "$_1234\n\0asdf";
|
||||
|
||||
static int rtp_packet_count = 0;
|
||||
|
||||
static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream) {
|
||||
static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
char *data = (char *)ptr;
|
||||
int channel = RTP_PKT_CHANNEL(data);
|
||||
int message_size;
|
||||
|
@ -69,7 +69,7 @@ struct timetest {
|
||||
};
|
||||
|
||||
UNITTEST_START
|
||||
|
||||
{
|
||||
struct timeval now;
|
||||
long timeout;
|
||||
unsigned int i;
|
||||
@ -141,6 +141,5 @@ for(i=0; i < sizeof(run)/sizeof(run[0]); i++) {
|
||||
if(timeout != run[i].result)
|
||||
fail(run[i].comment);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
UNITTEST_STOP
|
||||
|
@ -42,7 +42,8 @@ static void unit_stop(void)
|
||||
|
||||
#if defined(MSDOS) || defined(WIN32)
|
||||
|
||||
static char *getflagstr(int flags) {
|
||||
static char *getflagstr(int flags)
|
||||
{
|
||||
char *buf = malloc(256);
|
||||
fail_unless(buf, "out of memory");
|
||||
snprintf(buf, 256, "%s,%s,%s,%s",
|
||||
@ -53,7 +54,8 @@ static char *getflagstr(int flags) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
static char *getcurlcodestr(int cc) {
|
||||
static char *getcurlcodestr(int cc)
|
||||
{
|
||||
char *buf = malloc(256);
|
||||
fail_unless(buf, "out of memory");
|
||||
snprintf(buf, 256, "%s (%d)",
|
||||
|
Loading…
x
Reference in New Issue
Block a user