Gene Cumm
2009-Mar-06 02:55 UTC
[syslinux] [PATCH 1/1] COM32/rosh: remove now unneeded free() of dirent in COM32
From: Gene Cumm <gene.cumm at gmail.com> COM32/rosh: remove now unneeded free() of dirent in COM32 Signed-off-by: Gene Cumm <gene.cumm at gmail.com> --- I did create a macro to free up the dirents returned from readdir() as these were alloc()ed but now they are no longer alloc()ed outside of the DIR so can not be free()ed. Depends on string of patches this week. diff --git a/com32/rosh/rosh.c b/com32/rosh/rosh.c index d78e73a..1ffbe23 100644 --- a/com32/rosh/rosh.c +++ b/com32/rosh/rosh.c @@ -595,7 +595,6 @@ void rosh_ls_arg_dir(const char *filestr, DIR *d, const int while (de != NULL) { filepos++; rosh_ls_arg_dir_de(filestr, de, optarr); - ROSH_FREE_DIRENT(de); de = readdir(d); } } /* rosh_ls_arg_dir */ diff --git a/com32/rosh/rosh.h b/com32/rosh/rosh.h index ee89714..7168b44 100644 --- a/com32/rosh/rosh.h +++ b/com32/rosh/rosh.h @@ -62,7 +62,6 @@ #include <syslinux/config.h> /* Has info on the SYSLINUX variant */ #include <syslinux/boot.h> /* syslinux_run_command() */ #define ROSH_COM32(f, ...) printf (f, ## __VA_ARGS__) -#define ROSH_FREE_DIRENT(de) free(de) #else #include <termios.h> #define ROSH_IS_COM32 0 @@ -97,7 +96,6 @@ static inline int getscreensize(int fd, int *rows, int *cols) return rv; } #define ROSH_COM32(f, ...) ((void)0) -#define ROSH_FREE_DIRENT(de) ((void)0) #define syslinux_run_command(f) ((void)0) #endif /* __COM32__ */