[MPlayer-cvslog] r27002 - trunk/libmenu/menu_filesel.c
ben
subversion at mplayerhq.hu
Sat Jun 7 01:24:40 CEST 2008
Author: ben
Date: Sat Jun 7 01:24:39 2008
New Revision: 27002
Log:
Removed unused freepath variable.
Patch by Guillaume Lecerf <foxcore at gmail com>
Modified:
trunk/libmenu/menu_filesel.c
Modified: trunk/libmenu/menu_filesel.c
==============================================================================
--- trunk/libmenu/menu_filesel.c (original)
+++ trunk/libmenu/menu_filesel.c Sat Jun 7 01:24:39 2008
@@ -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* a
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* a
}
r = open_dir(menu,path);
- if (freepath)
- free(freepath);
-
return r;
}
More information about the MPlayer-cvslog
mailing list