Skip to content
Snippets Groups Projects
Commit cd3c1f62 authored by Johannes Kauffmann's avatar Johannes Kauffmann Committed by Steve Lhomme
Browse files

libaribcaption: remove unneeded strlen() check

var_InheritString() guarantees that, if the string returned is not NULL,
the string does not contain a NULL terminator as first character.

Checking for strlen() > 0 does the same as checking if the string
contains a NULL terminator as first character, because strlen() doesn't
count the NULL terminator. Thus, remove the unneeded check.
parent 849635ac
No related branches found
No related tags found
1 merge request!4802opencv_wrapper/libaribcaption: scope structure members locally
...@@ -416,7 +416,7 @@ static int Open(vlc_object_t *p_this) ...@@ -416,7 +416,7 @@ static int Open(vlc_object_t *p_this)
aribcc_renderer_set_force_no_ruby(p_renderer, p_sys->b_cfg_ignore_ruby); aribcc_renderer_set_force_no_ruby(p_renderer, p_sys->b_cfg_ignore_ruby);
aribcc_renderer_set_stroke_width(p_renderer, p_sys->f_cfg_stroke_width); aribcc_renderer_set_stroke_width(p_renderer, p_sys->f_cfg_stroke_width);
if (p_sys->psz_cfg_font_name && strlen(p_sys->psz_cfg_font_name) > 0) { if (p_sys->psz_cfg_font_name) {
const char* font_families[] = { p_sys->psz_cfg_font_name }; const char* font_families[] = { p_sys->psz_cfg_font_name };
aribcc_renderer_set_default_font_family(p_renderer, font_families, 1, true); aribcc_renderer_set_default_font_family(p_renderer, font_families, 1, true);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment