summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/o_dir_test.c
diff options
context:
space:
mode:
authorjsing <>2014-04-15 13:42:55 +0000
committerjsing <>2014-04-15 13:42:55 +0000
commit179b5aba8054138fe6ae76eb86d0ba485fa99f67 (patch)
treef085d85cb06e6b6e1a1b1d52cced54d9f7d7e5f2 /src/lib/libcrypto/o_dir_test.c
parent91b7379546c278344ff2e20e9eb6ecec326f20cd (diff)
downloadopenbsd-179b5aba8054138fe6ae76eb86d0ba485fa99f67.tar.gz
openbsd-179b5aba8054138fe6ae76eb86d0ba485fa99f67.tar.bz2
openbsd-179b5aba8054138fe6ae76eb86d0ba485fa99f67.zip
First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using tr and md5.
Diffstat (limited to 'src/lib/libcrypto/o_dir_test.c')
-rw-r--r--src/lib/libcrypto/o_dir_test.c34
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
46int main() 46int
47main()
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}