summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2015-07-20 23:15:29 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2015-07-20 23:15:29 +0000
commit283c1eeb65434d234ca3201d94ee5a9cfc4a6cfa (patch)
treeebd693d091ac5d0d2eb9ad7caf040c814d94454e /lib
parent41e29b412b39ae8956c785272e61caa2cb1021a5 (diff)
Correct #if/else logic in BIO's dgram_ctrl.
Coverity issue 72741 noticed that ret is being overwritten before use. The actual issue is that the #if/else logic is guarding the wrong lines. Besides impacting ret, this also made the case's break logic wrong because it was in the wrong location. ok bcook@ beck@
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/bio/bss_dgram.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypto/bio/bss_dgram.c b/lib/libcrypto/bio/bss_dgram.c
index a07834b62ce..a9657402ce6 100644
--- a/lib/libcrypto/bio/bss_dgram.c
+++ b/lib/libcrypto/bio/bss_dgram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bss_dgram.c,v 1.40 2015/02/09 10:55:33 jsing Exp $ */
+/* $OpenBSD: bss_dgram.c,v 1.41 2015/07/20 23:15:28 doug Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -423,10 +423,10 @@ dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
ret = -1;
break;
}
- ret = -1;
#else
- break;
+ ret = -1;
#endif
+ break;
case BIO_CTRL_DGRAM_QUERY_MTU:
#if defined(IP_MTU)
addr_len = (socklen_t)sizeof(addr);