From 47dca82001bf41dcd6954f72d2d27e3fbc2e8e9d Mon Sep 17 00:00:00 2001 From: David Levine Date: Sun, 14 Oct 2012 21:13:05 -0500 Subject: [PATCH] Removed unused function seek_home(). --- h/aliasbr.h | 2 -- uip/aliasbr.c | 34 ---------------------------------- 2 files changed, 36 deletions(-) diff --git a/h/aliasbr.h b/h/aliasbr.h index cc4da7f..f940026 100644 --- a/h/aliasbr.h +++ b/h/aliasbr.h @@ -35,8 +35,6 @@ struct home { struct home *h_next; /* next home in list */ }; -struct home *seek_home (char *); - /* * prototypes */ diff --git a/uip/aliasbr.c b/uip/aliasbr.c index d8350f9..4937251 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -46,7 +46,6 @@ static char *getalias (char *); static void add_aka (struct aka *, char *); static struct aka *akalloc (char *); static struct home *hmalloc (struct passwd *); -struct home *seek_home (char *); /* Do mh alias substitution on 's' and return the results. */ @@ -577,36 +576,3 @@ hmalloc (struct passwd *pw) return p; } - - -struct home * -seek_home (char *name) -{ - register struct home *hp; - struct passwd *pw; - char lname[32]; - unsigned char *c; - char *c1; - - for (hp = homehead; hp; hp = hp->h_next) - if (!mh_strcasecmp (name, hp->h_name)) - return hp; - - /* - * The only place where there might be problems. - * This assumes that ALL usernames are kept in lowercase. - */ - for (c = name, c1 = lname; - *c && (c1 - lname < (int) sizeof(lname) - 1); - c++, c1++) { - if (isalpha(*c) && isupper(*c)) - *c1 = tolower (*c); - else - *c1 = *c; - } - *c1 = '\0'; - if ((pw = getpwnam(lname))) - return(hmalloc(pw)); - - return NULL; -} -- 1.7.10.4