aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/test/conf_include_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/test/conf_include_test.c')
-rw-r--r--crypto/openssl/test/conf_include_test.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/crypto/openssl/test/conf_include_test.c b/crypto/openssl/test/conf_include_test.c
index 74c5c72b64f5..cd1d4881b926 100644
--- a/crypto/openssl/test/conf_include_test.c
+++ b/crypto/openssl/test/conf_include_test.c
@@ -14,26 +14,26 @@
#include "testutil.h"
#ifdef _WIN32
-# include <direct.h>
-# define DIRSEP "/\\"
-# ifndef __BORLANDC__
-# define chdir _chdir
-# endif
-# define DIRSEP_PRESERVE 0
+#include <direct.h>
+#define DIRSEP "/\\"
+#ifndef __BORLANDC__
+#define chdir _chdir
+#endif
+#define DIRSEP_PRESERVE 0
#elif !defined(OPENSSL_NO_POSIX_IO)
-# include <unistd.h>
-# ifndef OPENSSL_SYS_VMS
-# define DIRSEP "/"
-# define DIRSEP_PRESERVE 0
-# else
-# define DIRSEP "/]:"
-# define DIRSEP_PRESERVE 1
-# endif
+#include <unistd.h>
+#ifndef OPENSSL_SYS_VMS
+#define DIRSEP "/"
+#define DIRSEP_PRESERVE 0
+#else
+#define DIRSEP "/]:"
+#define DIRSEP_PRESERVE 1
+#endif
#else
/* the test does not work without chdir() */
-# define chdir(x) (-1);
-# define DIRSEP "/"
-# define DIRSEP_PRESERVE 0
+#define chdir(x) (-1);
+#define DIRSEP "/"
+#define DIRSEP_PRESERVE 0
#endif
/* changes path to that of the filename */
@@ -60,7 +60,7 @@ static char *change_path(const char *file)
ret = chdir(s);
if (ret == 0)
new_config_name = OPENSSL_strdup(last + DIRSEP_PRESERVE + 1);
- err:
+err:
OPENSSL_free(s);
return new_config_name;
}
@@ -149,17 +149,17 @@ static int test_load_config(void)
static int test_check_null_numbers(void)
{
-#if defined(_BSD_SOURCE) \
- || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \
- || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
+#if defined(_BSD_SOURCE) \
+ || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \
+ || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
long val = 0;
/* Verify that a NULL config with a present environment variable returns
* success and the value.
*/
if (!TEST_int_eq(setenv("FNORD", "123", 1), 0)
- || !TEST_true(NCONF_get_number(NULL, "missing", "FNORD", &val))
- || !TEST_long_eq(val, 123)) {
+ || !TEST_true(NCONF_get_number(NULL, "missing", "FNORD", &val))
+ || !TEST_long_eq(val, 123)) {
TEST_note("environment variable with NULL conf failed");
return 0;
}
@@ -169,7 +169,7 @@ static int test_check_null_numbers(void)
* a failure code.
*/
if (!TEST_int_eq(unsetenv("FNORD"), 0)
- || !TEST_false(NCONF_get_number(NULL, "missing", "FNORD", &val))) {
+ || !TEST_false(NCONF_get_number(NULL, "missing", "FNORD", &val))) {
TEST_note("missing environment variable with NULL conf failed");
return 0;
}
@@ -179,9 +179,9 @@ static int test_check_null_numbers(void)
static int test_check_overflow(void)
{
-#if defined(_BSD_SOURCE) \
- || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \
- || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
+#if defined(_BSD_SOURCE) \
+ || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \
+ || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
long val = 0;
char max[(sizeof(long) * 8) / 3 + 3];
char *p;
@@ -189,7 +189,7 @@ static int test_check_overflow(void)
p = max + BIO_snprintf(max, sizeof(max), "0%ld", LONG_MAX) - 1;
setenv("FNORD", max, 1);
if (!TEST_true(NCONF_get_number(NULL, "missing", "FNORD", &val))
- || !TEST_long_eq(val, LONG_MAX))
+ || !TEST_long_eq(val, LONG_MAX))
return 0;
while (++*p > '9')
@@ -238,7 +238,7 @@ const OPTIONS *test_get_options(void)
OPT_TEST_OPTIONS_WITH_EXTRA_USAGE("conf_file\n"),
{ "f", OPT_FAIL, '-', "A failure is expected" },
{ "providers", OPT_TEST_PROV, '-',
- "Test for activated default and legacy providers"},
+ "Test for activated default and legacy providers" },
{ NULL }
};
return test_options;