[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 102/264: cleanup: insert newline after if() conditions
From: |
gnunet |
Subject: |
[gnurl] 102/264: cleanup: insert newline after if() conditions |
Date: |
Thu, 30 Apr 2020 16:06:45 +0200 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 0e607542dca1247217997184224fc1a779778166
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Mar 30 10:55:31 2020 +0200
cleanup: insert newline after if() conditions
Our code style mandates we put the conditional block on a separate
line. These mistakes are now detected by the updated checksrc.
---
lib/if2ip.c | 12 ++++++------
lib/socks_gssapi.c | 3 ++-
lib/vtls/openssl.c | 3 ++-
src/tool_setopt.c | 3 ++-
tests/libtest/test.h | 12 +++++++-----
tests/unit/unit1394.c | 6 ++++--
6 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/lib/if2ip.c b/lib/if2ip.c
index d003de678..b283f67f8 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -129,11 +129,11 @@ if2ip_result_t Curl_if2ip(int af, unsigned int
remote_scope,
unsigned int ifscope = Curl_ipv6_scope(iface->ifa_addr);
if(ifscope != remote_scope) {
- /* We are interested only in interface addresses whose
- scope matches the remote address we want to
- connect to: global for global, link-local for
- link-local, etc... */
- if(res == IF2IP_NOT_FOUND) res = IF2IP_AF_NOT_SUPPORTED;
+ /* We are interested only in interface addresses whose scope
+ matches the remote address we want to connect to: global
+ for global, link-local for link-local, etc... */
+ if(res == IF2IP_NOT_FOUND)
+ res = IF2IP_AF_NOT_SUPPORTED;
continue;
}
diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c
index 97ee7183e..7f66675fc 100644
--- a/lib/socks_gssapi.c
+++ b/lib/socks_gssapi.c
@@ -227,7 +227,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
gss_release_buffer(&gss_status, &gss_send_token);
gss_release_buffer(&gss_status, &gss_recv_token);
- if(gss_major_status != GSS_S_CONTINUE_NEEDED) break;
+ if(gss_major_status != GSS_S_CONTINUE_NEEDED)
+ break;
/* analyse response */
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 14bfe3562..176fa522a 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -1824,7 +1824,8 @@ static CURLcode verifystatus(struct connectdata *conn,
}
end:
- if(br) OCSP_BASICRESP_free(br);
+ if(br)
+ OCSP_BASICRESP_free(br);
OCSP_RESPONSE_free(rsp);
return result;
diff --git a/src/tool_setopt.c b/src/tool_setopt.c
index f3b7a9c83..f244ba490 100644
--- a/src/tool_setopt.c
+++ b/src/tool_setopt.c
@@ -285,7 +285,8 @@ CURLcode tool_setopt_enum(CURL *curl, struct GlobalConfig
*config,
/* we only use this for real if --libcurl was used */
const NameValue *nv = NULL;
for(nv = nvlist; nv->name; nv++) {
- if(nv->value == lval) break; /* found it */
+ if(nv->value == lval)
+ break; /* found it */
}
if(! nv->name) {
/* If no definition was found, output an explicit value.
diff --git a/tests/libtest/test.h b/tests/libtest/test.h
index 393743962..4f2af415a 100644
--- a/tests/libtest/test.h
+++ b/tests/libtest/test.h
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -44,11 +44,13 @@
#include "curl_printf.h"
-#define test_setopt(A,B,C) \
- if((res = curl_easy_setopt((A), (B), (C))) != CURLE_OK) goto test_cleanup
+#define test_setopt(A,B,C) \
+ if((res = curl_easy_setopt((A), (B), (C))) != CURLE_OK) \
+ goto test_cleanup
-#define test_multi_setopt(A,B,C) \
- if((res = curl_multi_setopt((A), (B), (C))) != CURLE_OK) goto test_cleanup
+#define test_multi_setopt(A,B,C) \
+ if((res = curl_multi_setopt((A), (B), (C))) != CURLE_OK) \
+ goto test_cleanup
extern char *libtest_arg2; /* set by first.c to the argv[2] or NULL */
extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */
diff --git a/tests/unit/unit1394.c b/tests/unit/unit1394.c
index 6855fc7ab..d6644f8eb 100644
--- a/tests/unit/unit1394.c
+++ b/tests/unit/unit1394.c
@@ -122,8 +122,10 @@ UNITTEST_START
fail("assertion failure");
}
}
- if(certname) free(certname);
- if(passphrase) free(passphrase);
+ if(certname)
+ free(certname);
+ if(passphrase)
+ free(passphrase);
}
UNITTEST_STOP
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 63/264: TODO: Use "random" ports for the test servers, (continued)
- [gnurl] 63/264: TODO: Use "random" ports for the test servers, gnunet, 2020/04/30
- [gnurl] 85/264: RELEASE-NOTES: synced, gnunet, 2020/04/30
- [gnurl] 120/264: windows: enable UnixSockets with all build toolchains, gnunet, 2020/04/30
- [gnurl] 118/264: sockfilt: remove redundancy in timeout handling, gnunet, 2020/04/30
- [gnurl] 97/264: output.d: quote the URL when globbing, gnunet, 2020/04/30
- [gnurl] 15/264: tests: remove python_dependencies for smbserver from our tree, gnunet, 2020/04/30
- [gnurl] 94/264: curl.h: remnove CURL_VERSION_ESNI. Never supported nor documented, gnunet, 2020/04/30
- [gnurl] 96/264: dist: add tests/version-scan.pl to tarball, gnunet, 2020/04/30
- [gnurl] 99/264: ngtcp2: update to git master for the key installation API change, gnunet, 2020/04/30
- [gnurl] 129/264: lib670: use the same Win32 API check as all other lib tests, gnunet, 2020/04/30
- [gnurl] 102/264: cleanup: insert newline after if() conditions,
gnunet <=
- [gnurl] 87/264: mailmap: fixup a few author names/fields, gnunet, 2020/04/30
- [gnurl] 86/264: version: add 'cainfo' and 'capath' to version info struct, gnunet, 2020/04/30
- [gnurl] 100/264: cmake: add CMAKE_MSVC_RUNTIME_LIBRARY, gnunet, 2020/04/30
- [gnurl] 135/264: dist: add missing setup-win32.h, gnunet, 2020/04/30
- [gnurl] 140/264: CURLOPT_WRITEFUNCTION.3: add inline example and new see-also, gnunet, 2020/04/30
- [gnurl] 106/264: examples/sessioninfo.c: add include to fix compiler warning, gnunet, 2020/04/30
- [gnurl] 142/264: tests/README: update the port numbers list, gnunet, 2020/04/30
- [gnurl] 105/264: misc: copyright year updates, gnunet, 2020/04/30
- [gnurl] 108/264: CI: add build with ngtcp2 + gnutls on Travis CI, gnunet, 2020/04/30
- [gnurl] 77/264: CI: bring GitHub Actions fuzzing job in line with macOS jobs, gnunet, 2020/04/30