[vlc-devel] [PATCH 2/2] freetype: simplify error checking

Marvin Scholz epirat07 at gmail.com
Thu Nov 7 00:43:10 CET 2019


---
 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;
     }
 
-- 
2.20.1 (Apple Git-117)



More information about the vlc-devel mailing list