[vlc-commits] freetype: simplify error checking
Marvin Scholz
git at videolan.org
Wed Dec 4 11:33:01 CET 2019
vlc/vlc-3.0 | branch: master | Marvin Scholz <epirat07 at gmail.com> | Thu Nov 7 00:43:10 2019 +0100| [621211bcdaa3759a440fd14a00fc6538e15e06eb] | committer: Marvin Scholz
freetype: simplify error checking
(cherry picked from commit cbd47eb4299f74ec7b38ae3cfeba664d1c1b5afb)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=621211bcdaa3759a440fd14a00fc6538e15e06eb
---
modules/text_renderer/freetype/fonts/darwin.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/modules/text_renderer/freetype/fonts/darwin.c b/modules/text_renderer/freetype/fonts/darwin.c
index 5620f1f078..bf9f826838 100644
--- a/modules/text_renderer/freetype/fonts/darwin.c
+++ b/modules/text_renderer/freetype/fonts/darwin.c
@@ -279,11 +279,7 @@ vlc_family_t *CoreText_GetFallbacks(filter_t *p_filter, const char *psz_family,
psz_fontPath = getPathForFontDescription(fallbackFontDescriptor);
/* check if the path is empty, which can happen in rare circumstances */
- if (psz_fontPath != NULL) {
- if (strcmp("", psz_fontPath) == 0) {
- goto done;
- }
- } else {
+ if (psz_fontPath == NULL || *psz_fontPath == '\0') {
goto done;
}
More information about the vlc-commits
mailing list