diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-31 20:40:20 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-02 11:02:56 +0100 |
commit | a9fbdaf46b23db5c598bf33d6bc5c4555b06e674 (patch) | |
tree | e7894501bd010d9904fe0069fc1b8121d2da4040 /toxav/audio.c | |
parent | 6f42eadc54e81be50b7a817c72b0cf4d7ec5feb4 (diff) |
Do not use `else` after `return`.
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
Diffstat (limited to 'toxav/audio.c')
-rw-r--r-- | toxav/audio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/toxav/audio.c b/toxav/audio.c index eaa1f6d0..c0bfa608 100644 --- a/toxav/audio.c +++ b/toxav/audio.c | |||
@@ -413,13 +413,13 @@ bool reconfigure_audio_encoder(Logger *log, OpusEncoder **e, int32_t new_br, int | |||
413 | *e = new_encoder; | 413 | *e = new_encoder; |
414 | } else if (*old_br == new_br) { | 414 | } else if (*old_br == new_br) { |
415 | return true; /* Nothing changed */ | 415 | return true; /* Nothing changed */ |
416 | } else { | 416 | } |
417 | int status = opus_encoder_ctl(*e, OPUS_SET_BITRATE(new_br)); | ||
418 | 417 | ||
419 | if (status != OPUS_OK) { | 418 | int status = opus_encoder_ctl(*e, OPUS_SET_BITRATE(new_br)); |
420 | LOGGER_ERROR(log, "Error while setting encoder ctl: %s", opus_strerror(status)); | 419 | |
421 | return false; | 420 | if (status != OPUS_OK) { |
422 | } | 421 | LOGGER_ERROR(log, "Error while setting encoder ctl: %s", opus_strerror(status)); |
422 | return false; | ||
423 | } | 423 | } |
424 | 424 | ||
425 | *old_br = new_br; | 425 | *old_br = new_br; |