vlc | branch: master | Steve Lhomme <[email protected]> | Mon Apr 6 13:05:54 2020 +0200| [f96c68f8582182c20abebfaacd5bf433498d0e05] | committer: Steve Lhomme
win32: dirs-uap: simplify config_GetSysPath NULL checks > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f96c68f8582182c20abebfaacd5bf433498d0e05 --- src/win32/dirs-uap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/win32/dirs-uap.c b/src/win32/dirs-uap.c index 4b97f36e4b..c3869f3f57 100644 --- a/src/win32/dirs-uap.c +++ b/src/win32/dirs-uap.c @@ -132,10 +132,8 @@ char *config_GetSysPath(vlc_sysdir_t type, const char *filename) break; case VLC_PKG_LIB_DIR: case VLC_PKG_LIBEXEC_DIR: - dir = NULL; - break; case VLC_SYSDATA_DIR: - break; + return NULL; case VLC_LOCALE_DIR: dir = config_GetSysPath(VLC_PKG_DATA_DIR, "locale"); break; @@ -143,7 +141,10 @@ char *config_GetSysPath(vlc_sysdir_t type, const char *filename) vlc_assert_unreachable(); } - if (filename == NULL || unlikely(dir == NULL)) + if (unlikely(dir == NULL)) + return NULL; + + if (filename == NULL) return dir; char *path; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
