mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-29 20:59:47 +01:00
Problem: redundant else after return
Solution: remove else
This commit is contained in:
@@ -90,7 +90,8 @@ static int do_getsockopt_curve_key (void *const optval_,
|
||||
if (*optvallen_ == CURVE_KEYSIZE) {
|
||||
memcpy (optval_, curve_key_, CURVE_KEYSIZE);
|
||||
return 0;
|
||||
} else if (*optvallen_ == CURVE_KEYSIZE_Z85 + 1) {
|
||||
}
|
||||
if (*optvallen_ == CURVE_KEYSIZE_Z85 + 1) {
|
||||
zmq_z85_encode (static_cast<char *> (optval_), curve_key_,
|
||||
CURVE_KEYSIZE);
|
||||
return 0;
|
||||
@@ -150,7 +151,8 @@ do_setsockopt_string_allow_empty_strict (const void *const optval_,
|
||||
if (optval_ == NULL && optvallen_ == 0) {
|
||||
out_value_->clear ();
|
||||
return 0;
|
||||
} else if (optval_ != NULL && optvallen_ > 0 && optvallen_ <= max_len_) {
|
||||
}
|
||||
if (optval_ != NULL && optvallen_ > 0 && optvallen_ <= max_len_) {
|
||||
out_value_->assign (static_cast<const char *> (optval_), optvallen_);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user