From ab02aa24ee5095776d5b9c482b1a1c377955bc1b Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 19 Nov 2018 06:50:55 +0100 Subject: tests: resume: use spaces around '?' and ':' according to coding style Also set a link to the kernel coding style in CONTRIBUTIONS.md Signed-off-by: Nikos Mavrogiannopoulos --- CONTRIBUTING.md | 5 +++-- tests/resume.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c5a02c61a6..dc0f40d0a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,8 +63,9 @@ case by case basis. # Indentation style: - In general, use the Linux kernel coding style. You may indent the source -using GNU indent, e.g. "indent -linux *.c". + In general, use [the Linux kernel coding style](https://www.kernel.org/doc/html/latest/process/coding-style.html). +You may indent the source using GNU indent, e.g. "indent -linux *.c". + # Function names: diff --git a/tests/resume.c b/tests/resume.c index 3ce3e293c1..41cbebf8ea 100644 --- a/tests/resume.c +++ b/tests/resume.c @@ -395,13 +395,13 @@ static void verify_server_params(gnutls_session_t session, unsigned counter, str fail("did not find the expected X509 certificate type! (%d)\n", gnutls_certificate_type_get(session)); if (counter == 0 && gnutls_certificate_get_ours(session) == NULL) - fail("no certificate returned on server side (%s)\n", counter?"resumed session":"first session"); + fail("no certificate returned on server side (%s)\n", counter ? "resumed session" : "first session"); else if (counter != 0 && gnutls_certificate_get_ours(session) != NULL) - fail("certificate was returned on server side (%s)\n", counter?"resumed session":"first session"); + fail("certificate was returned on server side (%s)\n", counter ? "resumed session" : "first session"); if (params->client_cert) { if (gnutls_certificate_get_peers(session, &l) == NULL || l < 1) - fail("no client certificate returned on server side (%s)\n", counter?"resumed session":"first session"); + fail("no client certificate returned on server side (%s)\n", counter ? "resumed session" : "first session"); } #endif @@ -435,7 +435,7 @@ static void verify_client_params(gnutls_session_t session, unsigned counter) #if defined(USE_X509) unsigned int l; if (gnutls_certificate_get_peers(session, &l) == NULL || l < 1) - fail("no server certificate returned on client side (%s)\n", counter?"resumed session":"first session"); + fail("no server certificate returned on client side (%s)\n", counter ? "resumed session" : "first session"); #else return; #endif -- cgit v1.2.1