diff options
Diffstat (limited to 'src/lib/libcrypto/o_dir_test.c')
| -rw-r--r-- | src/lib/libcrypto/o_dir_test.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/lib/libcrypto/o_dir_test.c b/src/lib/libcrypto/o_dir_test.c index 238717c110..2973458a94 100644 --- a/src/lib/libcrypto/o_dir_test.c +++ b/src/lib/libcrypto/o_dir_test.c | |||
| @@ -43,26 +43,24 @@ | |||
| 43 | #error "No supported platform defined!" | 43 | #error "No supported platform defined!" |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| 46 | int main() | 46 | int |
| 47 | main() | ||
| 47 | { | 48 | { |
| 48 | OPENSSL_DIR_CTX *ctx = NULL; | 49 | OPENSSL_DIR_CTX *ctx = NULL; |
| 49 | const char *result; | 50 | const char *result; |
| 50 | 51 | ||
| 51 | while((result = OPENSSL_DIR_read(&ctx, CURRDIR)) != NULL) | 52 | while ((result = OPENSSL_DIR_read(&ctx, CURRDIR)) != NULL) { |
| 52 | { | 53 | printf("%s\n", result); |
| 53 | printf("%s\n", result); | 54 | } |
| 54 | } | ||
| 55 | 55 | ||
| 56 | if (errno) | 56 | if (errno) { |
| 57 | { | 57 | perror("test_dir"); |
| 58 | perror("test_dir"); | 58 | exit(1); |
| 59 | exit(1); | 59 | } |
| 60 | } | ||
| 61 | 60 | ||
| 62 | if (!OPENSSL_DIR_end(&ctx)) | 61 | if (!OPENSSL_DIR_end(&ctx)) { |
| 63 | { | 62 | perror("test_dir"); |
| 64 | perror("test_dir"); | 63 | exit(2); |
| 65 | exit(2); | 64 | } |
| 66 | } | 65 | exit(0); |
| 67 | exit(0); | ||
| 68 | } | 66 | } |
