From a981141b199702ffd780a4390e601db565102c65 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 3 Apr 2016 16:21:10 +0200 Subject: unit: make unit test source code checksrc compliant --- tests/unit/unit1304.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'tests/unit/unit1304.c') diff --git a/tests/unit/unit1304.c b/tests/unit/unit1304.c index 8c306e44e..11bba390f 100644 --- a/tests/unit/unit1304.c +++ b/tests/unit/unit1304.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -31,10 +31,10 @@ static CURLcode unit_setup(void) { password = strdup(""); login = strdup(""); - if (!password || !login) { - Curl_safefree(password); - Curl_safefree(login); - return CURLE_OUT_OF_MEMORY; + if(!password || !login) { + Curl_safefree(password); + Curl_safefree(login); + return CURLE_OUT_OF_MEMORY; } return CURLE_OK; } @@ -72,7 +72,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); - fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); + fail_unless(strncmp(login, "me", 2) == 0, + "login should not have been changed"); /* * Test a non existent login and host in our netrc file. @@ -85,7 +86,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); - fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed"); + fail_unless(strncmp(login, "me", 2) == 0, + "login should not have been changed"); /* * Test a non existent login (substring of an existing one) in our @@ -99,7 +101,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); - fail_unless(strncmp(login, "admi", 4) == 0, "login should not have been changed"); + fail_unless(strncmp(login, "admi", 4) == 0, + "login should not have been changed"); /* * Test a non existent login (superstring of an existing one) @@ -113,7 +116,8 @@ UNITTEST_START abort_unless(password != NULL, "returned NULL!"); fail_unless(password[0] == 0, "password should not have been changed"); abort_unless(login != NULL, "returned NULL!"); - fail_unless(strncmp(login, "adminn", 6) == 0, "login should not have been changed"); + fail_unless(strncmp(login, "adminn", 6) == 0, + "login should not have been changed"); /* * Test for the first existing host in our netrc file -- cgit v1.2.3