daemon/config: factor out duplicate xstrdup_tolower
We have two implementations of the same function; let's drop that to one. We take the name from daemon.c, but the implementation (which is just slightly more efficient) from the config code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
7bbc4e8fdb
commit
88d5a6f6cd
8
daemon.c
8
daemon.c
@ -475,14 +475,6 @@ static void make_service_overridable(const char *name, int ena)
|
||||
die("No such service %s", name);
|
||||
}
|
||||
|
||||
static char *xstrdup_tolower(const char *str)
|
||||
{
|
||||
char *p, *dup = xstrdup(str);
|
||||
for (p = dup; *p; p++)
|
||||
*p = tolower(*p);
|
||||
return dup;
|
||||
}
|
||||
|
||||
static void parse_host_and_port(char *hostport, char **host,
|
||||
char **port)
|
||||
{
|
||||
|
Reference in New Issue
Block a user