diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 14:29:48 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 14:29:48 -0400 |
commit | 666964780a245c14e8f0eb6e13dd854a37387ea9 (patch) | |
tree | d50fcd19525107e6c675ab342e84805da21a684e /demos | |
parent | 190c8c60c11467424910605d8d0098ccc1168fdc (diff) | |
download | openssl-new-666964780a245c14e8f0eb6e13dd854a37387ea9.tar.gz |
Remove goto inside an if(0) block
There were a dozen-plus instances of this construct:
if (0) { label: ..... }
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'demos')
-rw-r--r-- | demos/bio/sconnect.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/demos/bio/sconnect.c b/demos/bio/sconnect.c index 73280b576a..6e4ca6596b 100644 --- a/demos/bio/sconnect.c +++ b/demos/bio/sconnect.c @@ -96,17 +96,16 @@ char *argv[]; } ret = 1; + goto done; - if (0) { err: - if (ERR_peek_error() == 0) { /* system call error */ - fprintf(stderr, "errno=%d ", errno); - perror("error"); - } else - ERR_print_errors_fp(stderr); - } + if (ERR_peek_error() == 0) { /* system call error */ + fprintf(stderr, "errno=%d ", errno); + perror("error"); + } else + ERR_print_errors_fp(stderr); + done: BIO_free_all(out); SSL_CTX_free(ssl_ctx); - exit(!ret); - return (ret); + return (ret == 1); } |