[vlc-devel] [PATCH] linux/dirs: remove a goto

Zhao Zhili quinkblack at foxmail.com
Thu Nov 1 04:21:14 CET 2018


The label 'error' should be 'bailout'.
---
 src/linux/dirs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/linux/dirs.c b/src/linux/dirs.c
index b8ad5b9..92fd358 100644
--- a/src/linux/dirs.c
+++ b/src/linux/dirs.c
@@ -37,7 +37,7 @@ static char *config_GetLibDirRaw(void)
     /* Find the path to libvlc (i.e. ourselves) */
     FILE *maps = fopen ("/proc/self/maps", "rte");
     if (maps == NULL)
-        goto error;
+        return strdup(LIBDIR);
 
     char *line = NULL;
     size_t linelen = 0;
@@ -72,7 +72,6 @@ static char *config_GetLibDirRaw(void)
 
     free (line);
     fclose (maps);
-error:
     if (path == NULL)
         path = strdup(LIBDIR);
     return path;
-- 
2.9.5





More information about the vlc-devel mailing list