Simplify.
authorsebastid <sebastid>
Mon, 10 Oct 2005 20:46:22 +0000 (20:46 +0000)
committersebastid <sebastid@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 10 Oct 2005 20:46:22 +0000 (20:46 +0000)
SVN revision: 17407

src/bin/e_fileman_smart.c

index 7e0b8bc..a474409 100644 (file)
@@ -2644,13 +2644,11 @@ _e_fm_file_exec(E_Fileman_File *file)
 static char *
 _e_fm_file_fullname(E_Fileman_File *file)
 {
-   char *fullname;
+   char fullname[PATH_MAX];
 
-   fullname = E_NEW(char, PATH_MAX);
-   if (fullname)
-     snprintf(fullname, PATH_MAX, "%s/%s", file->sd->dir, file->dir_entry->d_name);
+   snprintf(fullname, sizeof(fullname), "%s/%s", file->sd->dir, file->dir_entry->d_name);
 
-   return fullname;
+   return strdup(fullname);
 }
 
 static char *