correct cases of code occuring directly after goto/break/return
authorjsg <jsg@openbsd.org>
Tue, 15 Apr 2014 11:50:18 +0000 (11:50 +0000)
committerjsg <jsg@openbsd.org>
Tue, 15 Apr 2014 11:50:18 +0000 (11:50 +0000)
ok miod@ guenther@

lib/libcrypto/x509/x509_vfy.c
lib/libssl/d1_both.c
lib/libssl/src/crypto/x509/x509_vfy.c
lib/libssl/src/ssl/d1_both.c
lib/libssl/src/ssl/ssl_task.c

index 920066a..a82c287 100644 (file)
@@ -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 */
index 6e51aa7..ab6b168 100644 (file)
@@ -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);
index 920066a..a82c287 100644 (file)
@@ -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 */
index 6e51aa7..ab6b168 100644 (file)
@@ -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);
index 25d20b0..be03198 100644 (file)
@@ -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;