From 5e81b4be891770c432664f618edf766c8216e8f2 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 11 Aug 2013 14:00:31 +0400 Subject: [PATCH] (do_panelize_cd): minor optimization. Signed-off-by: Andrew Borodin --- src/filemanager/panelize.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/filemanager/panelize.c b/src/filemanager/panelize.c index 25f605e37..6606a2063 100644 --- a/src/filemanager/panelize.c +++ b/src/filemanager/panelize.c @@ -423,14 +423,14 @@ do_panelize_cd (struct WPanel *panel) else { vfs_path_t *tmp_vpath; - const char *tmp_path; + const char *fname; tmp_vpath = vfs_path_append_new (panelized_panel.root_vpath, panelized_panel.list.list[i].fname, NULL); - tmp_path = vfs_path_as_str (tmp_vpath); - list->list[i].fnamelen = strlen (tmp_path); - list->list[i].fname = g_strndup (tmp_path, list->list[i].fnamelen); + fname = vfs_path_as_str (tmp_vpath); + list->list[i].fnamelen = strlen (fname); + list->list[i].fname = g_strndup (fname, list->list[i].fnamelen); vfs_path_free (tmp_vpath); } list->list[i].f.link_to_dir = panelized_panel.list.list[i].f.link_to_dir;