summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/o_dir_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/o_dir_test.c')
-rw-r--r--src/lib/libcrypto/o_dir_test.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/lib/libcrypto/o_dir_test.c b/src/lib/libcrypto/o_dir_test.c
index 3d75ecb005..2973458a94 100644
--- a/src/lib/libcrypto/o_dir_test.c
+++ b/src/lib/libcrypto/o_dir_test.c
@@ -39,32 +39,28 @@
39 39
40#if defined OPENSSL_SYS_UNIX || defined OPENSSL_SYS_WIN32 || defined OPENSSL_SYS_WINCE 40#if defined OPENSSL_SYS_UNIX || defined OPENSSL_SYS_WIN32 || defined OPENSSL_SYS_WINCE
41#define CURRDIR "." 41#define CURRDIR "."
42#elif defined OPENSSL_SYS_VMS
43#define CURRDIR "SYS$DISK:[]"
44#else 42#else
45#error "No supported platform defined!" 43#error "No supported platform defined!"
46#endif 44#endif
47 45
48int main() 46int
47main()
49{ 48{
50 OPENSSL_DIR_CTX *ctx = NULL; 49 OPENSSL_DIR_CTX *ctx = NULL;
51 const char *result; 50 const char *result;
52 51
53 while((result = OPENSSL_DIR_read(&ctx, CURRDIR)) != NULL) 52 while ((result = OPENSSL_DIR_read(&ctx, CURRDIR)) != NULL) {
54 { 53 printf("%s\n", result);
55 printf("%s\n", result); 54 }
56 }
57 55
58 if (errno) 56 if (errno) {
59 { 57 perror("test_dir");
60 perror("test_dir"); 58 exit(1);
61 exit(1); 59 }
62 }
63 60
64 if (!OPENSSL_DIR_end(&ctx)) 61 if (!OPENSSL_DIR_end(&ctx)) {
65 { 62 perror("test_dir");
66 perror("test_dir"); 63 exit(2);
67 exit(2); 64 }
68 } 65 exit(0);
69 exit(0);
70} 66}