Problem: redundant else after return

Solution: remove else
This commit is contained in:
Simon Giesecke
2018-05-25 23:10:10 +02:00
parent 21498700ef
commit 12a97bb769
22 changed files with 154 additions and 163 deletions

View File

@@ -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;
}