diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-22 03:29:12 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-22 09:31:38 +0000 |
commit | ae5c8664e587f2445c8e4eb436cffbb64af4f6b8 (patch) | |
tree | 6d5b2cbee6396484f83126f8c7e7a36b9777a652 /test/dummytest.c | |
parent | aae3233e1e08e9f11742f8f351af5c98cd8add16 (diff) |
Run util/openssl-format-source -v -c .
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'test/dummytest.c')
-rw-r--r-- | test/dummytest.c | 71 |
1 files changed, 40 insertions, 31 deletions
diff --git a/test/dummytest.c b/test/dummytest.c index 5b4467e042..554acc221f 100644 --- a/test/dummytest.c +++ b/test/dummytest.c @@ -7,42 +7,51 @@ #include <openssl/crypto.h> int main(int argc, char *argv[]) - { - char *p, *q = 0, *program; +{ + char *p, *q = 0, *program; - p = strrchr(argv[0], '/'); - if (!p) p = strrchr(argv[0], '\\'); + p = strrchr(argv[0], '/'); + if (!p) + p = strrchr(argv[0], '\\'); #ifdef OPENSSL_SYS_VMS - if (!p) p = strrchr(argv[0], ']'); - if (p) q = strrchr(p, '>'); - if (q) p = q; - if (!p) p = strrchr(argv[0], ':'); - q = 0; + if (!p) + p = strrchr(argv[0], ']'); + if (p) + q = strrchr(p, '>'); + if (q) + p = q; + if (!p) + p = strrchr(argv[0], ':'); + q = 0; #endif - if (p) p++; - if (!p) p = argv[0]; - if (p) q = strchr(p, '.'); - if (p && !q) q = p + strlen(p); + if (p) + p++; + if (!p) + p = argv[0]; + if (p) + q = strchr(p, '.'); + if (p && !q) + q = p + strlen(p); - if (!p) - program = BUF_strdup("(unknown)"); - else - { - program = OPENSSL_malloc((q - p) + 1); - strncpy(program, p, q - p); - program[q - p] = '\0'; - } + if (!p) + program = BUF_strdup("(unknown)"); + else { + program = OPENSSL_malloc((q - p) + 1); + strncpy(program, p, q - p); + program[q - p] = '\0'; + } - for(p = program; *p; p++) - if (islower((unsigned char)(*p))) - *p = toupper((unsigned char)(*p)); + for (p = program; *p; p++) + if (islower((unsigned char)(*p))) + *p = toupper((unsigned char)(*p)); - q = strstr(program, "TEST"); - if (q > p && q[-1] == '_') q--; - *q = '\0'; + q = strstr(program, "TEST"); + if (q > p && q[-1] == '_') + q--; + *q = '\0'; - printf("No %s support\n", program); + printf("No %s support\n", program); - OPENSSL_free(program); - return(0); - } + OPENSSL_free(program); + return (0); +} |