lib/signames: remove unused function
Subsystems (2)
PATCH 1/3 lib/signames: remove unused function
Signed-off-by Sami Kerola <[email protected]>
--- include/signames.h | 1 - lib/signames.c | 5 ----- 2 files changed, 6 deletions(-)
include/signames.h +0 -1
@@ -3,7 +3,6 @@int signame_to_signum (const char *sig);const char *signum_to_signame (int signum); -size_t get_numof_signames (void );int get_signame_by_idx (size_t idx,const char **signame,int *signum);#endif /* SIGNAMES_H */
lib/signames.c +0 -5
@@ -189,11 +189,6 @@ const char *signum_to_signame(int signum)return NULL ; } -size_t get_numof_signames (void ) -{ -return ARRAY_SIZE (ul_signames); -} -int get_signame_by_idx (size_t idx,const char **signame,int *signum) {if (idx >=ARRAY_SIZE (ul_signames))
Signature · 1 line
2.15.0
PATCH 2/3 logindefs: remove unused function
Signed-off-by Sami Kerola <[email protected]>
--- login-utils/logindefs.c | 18 ------------------ login-utils/logindefs.h | 1 - 2 files changed, 19 deletions(-)
login-utils/logindefs.c +0 -18
@@ -51,24 +51,6 @@ static struct item *list = NULL;static void (*logindefs_loader)(void *) =NULL ;static void *logindefs_loader_data =NULL ; -void free_getlogindefs_data (void ) -{ -struct item *ptr; - - ptr = list; -while (ptr) { -struct item *tmp = ptr->next; - -free (ptr->path); -free (ptr->name); -free (ptr->value); -free (ptr); - ptr = tmp; - } - - list =NULL ; -} -static void store (const char *name,const char *value,const char *path) {struct item *new =xmalloc (sizeof (struct item ));
login-utils/logindefs.h +0 -1
@@ -6,7 +6,6 @@ extern void logindefs_set_loader(void (*loader)(void *data), void *data);extern int getlogindefs_bool (const char *name,int dflt);extern unsigned long getlogindefs_num (const char *name,long dflt);extern const char *getlogindefs_str (const char *name,const char *dflt); -extern void free_getlogindefs_data (void );extern int logindefs_setenv (const char *name,const char *conf,const char *dflt);extern int effective_access (const char *path,int mode);extern int get_hushlogin_status (struct passwd *pwd,int force_check);
Signature · 1 line
2.15.0
Karel Zak
maintainerRe: [PATCH 2/3] logindefs: remove unused function
Quoted 3 lines · Sami Kerola
login-utils/logindefs.c | 18 ------------------ login-utils/logindefs.h | 1 - 2 files changed, 19 deletions(-)
All patches applied except this patch.
I've added free_getlogindefs_data() to su(1) and login(1). It seems like a good idea to deallocate the config file when we only wait for child process.
Thanks!
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
PATCH 3/3 eject: remove list_speeds() #ifdef CDROM_SELECT_SPEED protection
In reply to Sami KerolaThe CDROM_SELECT_SPEED should be available practically everywhere. Where the define is missing an error message about path /proc/sys/dev/cdrom/info cannot be opened is better error than a warnx() about kernel support.
Signed-off-by Sami Kerola <[email protected]>
--- sys-utils/eject.c | 4 ---- 1 file changed, 4 deletions(-)
sys-utils/eject.c +0 -4
@@ -548,7 +548,6 @@ static int read_speed(const char *devname)*/ static void list_speeds (struct eject_control *ctl) { -#ifdef CDROM_SELECT_SPEED int max_speed, curr_speed =0 ;select_speed (ctl);
@@ -565,9 +564,6 @@ static void list_speeds(struct eject_control *ctl) }printf ("\n" ); -#else -warnx (_ ("CD-ROM select speed command not supported by this kernel" )); -#endif }/*
Signature · 1 line
2.15.0