[vlc-commits] freetype: simplify error checking

Marvin Scholz git at videolan.org
Mon Nov 18 15:34:44 CET 2019


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Thu Nov  7 00:43:10 2019 +0100| [cbd47eb4299f74ec7b38ae3cfeba664d1c1b5afb] | committer: Marvin Scholz

freetype: simplify error checking

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cbd47eb4299f74ec7b38ae3cfeba664d1c1b5afb
---

 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 3b91284272..5505948231 100644
--- a/modules/text_renderer/freetype/fonts/darwin.c
+++ b/modules/text_renderer/freetype/fonts/darwin.c
@@ -241,11 +241,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