From 8c2667e55ec2e3fbd973be92013615c33134c9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 00:17:02 +0100 Subject: Simplify code by returning immediately if the condition is not met. --- src/spu_dec/cc_decoder.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/spu_dec/cc_decoder.c b/src/spu_dec/cc_decoder.c index 49538ca66..c0e0e4930 100644 --- a/src/spu_dec/cc_decoder.c +++ b/src/spu_dec/cc_decoder.c @@ -932,11 +932,11 @@ static void cc_renderer_show_caption(cc_renderer_t *this, cc_buffer_t *buf, static void cc_renderer_free_osd_object(cc_renderer_t *this) { /* hide and free old displayed caption object if necessary */ - if (this->cap_display) { - cc_renderer_hide_caption(this, this->display_vpts); - this->osd_renderer->free_object(this->cap_display); - this->cap_display = NULL; - } + if ( ! this->cap_display ) return; + + cc_renderer_hide_caption(this, this->display_vpts); + this->osd_renderer->free_object(this->cap_display); + this->cap_display = NULL; } -- cgit v1.2.3