[vlc-commits] freetype: Simplify path check

Marvin Scholz git at videolan.org
Mon Jun 19 14:33:26 CEST 2017


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sat Jun 17 17:05:13 2017 +0200| [f5ac138fc1f2cc7a679178c2d468826f9d9bcfb9] | committer: Marvin Scholz

freetype: Simplify path check

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

 modules/text_renderer/freetype/fonts/darwin.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/modules/text_renderer/freetype/fonts/darwin.c b/modules/text_renderer/freetype/fonts/darwin.c
index 06dec792da..a3ea832954 100644
--- a/modules/text_renderer/freetype/fonts/darwin.c
+++ b/modules/text_renderer/freetype/fonts/darwin.c
@@ -172,12 +172,8 @@ const vlc_family_t *CoreText_GetFamily(filter_t *p_filter, const char *psz_famil
         path = getPathForFontDescription(iter);
 
         /* check if the path is empty, which can happen in rare circumstances */
-        if (path != NULL) {
-            if (strcmp("", path) == 0) {
-                FREENULL(path);
-                continue;
-            }
-        } else {
+        if (path == NULL || *path == '\0') {
+            FREENULL(path);
             continue;
         }
 



More information about the vlc-commits mailing list