From ab563839bbe3ddf11336b51c80c7fb09adb04abb Mon Sep 17 00:00:00 2001 From: jsg <> Date: Tue, 15 Apr 2014 11:50:18 +0000 Subject: correct cases of code occuring directly after goto/break/return ok miod@ guenther@ --- src/lib/libcrypto/x509/x509_vfy.c | 1 - src/lib/libssl/d1_both.c | 2 +- src/lib/libssl/src/crypto/x509/x509_vfy.c | 1 - src/lib/libssl/src/ssl/d1_both.c | 2 +- src/lib/libssl/src/ssl/ssl_task.c | 4 ++-- 5 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index 920066aeba..a82c2872e0 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c @@ -424,7 +424,6 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) ctx->current_cert = x; ctx->current_issuer = issuer; return ctx->verify_cb(0, ctx); - return 0; } /* Alternative lookup method: look from a STACK stored in other_ctx */ diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 6e51aa7f69..ab6b168410 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c @@ -647,8 +647,8 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok) { item = pitem_new(seq64be, frag); if (item == NULL) { - goto err; i = -1; + goto err; } pqueue_insert(s->d1->buffered_messages, item); diff --git a/src/lib/libssl/src/crypto/x509/x509_vfy.c b/src/lib/libssl/src/crypto/x509/x509_vfy.c index 920066aeba..a82c2872e0 100644 --- a/src/lib/libssl/src/crypto/x509/x509_vfy.c +++ b/src/lib/libssl/src/crypto/x509/x509_vfy.c @@ -424,7 +424,6 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) ctx->current_cert = x; ctx->current_issuer = issuer; return ctx->verify_cb(0, ctx); - return 0; } /* Alternative lookup method: look from a STACK stored in other_ctx */ diff --git a/src/lib/libssl/src/ssl/d1_both.c b/src/lib/libssl/src/ssl/d1_both.c index 6e51aa7f69..ab6b168410 100644 --- a/src/lib/libssl/src/ssl/d1_both.c +++ b/src/lib/libssl/src/ssl/d1_both.c @@ -647,8 +647,8 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok) { item = pitem_new(seq64be, frag); if (item == NULL) { - goto err; i = -1; + goto err; } pqueue_insert(s->d1->buffered_messages, item); diff --git a/src/lib/libssl/src/ssl/ssl_task.c b/src/lib/libssl/src/ssl/ssl_task.c index 25d20b06a0..be0319831a 100644 --- a/src/lib/libssl/src/ssl/ssl_task.c +++ b/src/lib/libssl/src/ssl/ssl_task.c @@ -322,14 +322,14 @@ doit(io_channel chan, SSL_CTX *s_ctx ) } if (length < RPC_HDR_SIZE ) { printf("Error in main loop get size: %d\n", length ); - break; link_state = 3; + break; } if (msg.channel != 'A' ) { printf("Error in main loop, unexpected channel: %c\n", msg.channel ); - break; link_state = 3; + break; } if (msg.function == 'G' ) { link_state = 1; -- cgit v1.2.3-55-g6feb