From a3e6050aa1eb1ab976cf4405db95322ed4317105 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 6 Jun 2008 23:24:39 +0000 Subject: Removed unused freepath variable. Patch by Guillaume Lecerf git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27002 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmenu/menu_filesel.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'libmenu') diff --git a/libmenu/menu_filesel.c b/libmenu/menu_filesel.c index 51436a7b6d..3a426582f6 100644 --- a/libmenu/menu_filesel.c +++ b/libmenu/menu_filesel.c @@ -391,7 +391,7 @@ static void clos(menu_t* menu) { } static int open_fs(menu_t* menu, char* args) { - char *path = mpriv->path, *freepath = NULL; + char *path = mpriv->path; int r = 0; char wd[PATH_MAX+1], b[PATH_MAX+1]; args = NULL; // Warning kill @@ -411,10 +411,8 @@ static int open_fs(menu_t* menu, char* args) { if (!fstat (path_fp, &st) && (st.st_size > 0)) { path = malloc(st.st_size+1); path[st.st_size] = '\0'; - if ((read(path_fp, path, st.st_size) == st.st_size) && path[0] == '/' - && !stat(path, &st) && S_ISDIR(st.st_mode)) - freepath = path; - else { + if (!((read(path_fp, path, st.st_size) == st.st_size) && path[0] == '/' + && !stat(path, &st) && S_ISDIR(st.st_mode))) { free(path); path = NULL; } @@ -467,9 +465,6 @@ static int open_fs(menu_t* menu, char* args) { } r = open_dir(menu,path); - if (freepath) - free(freepath); - return r; } -- cgit v1.2.3