From 88d5a6f6cd1b63e1637027322cdfdbeefe38c3ed Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 22 May 2014 05:44:09 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- daemon.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'daemon.c') diff --git a/daemon.c b/daemon.c index 13608c07c..d514ba47f 100644 --- a/daemon.c +++ b/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) { -- cgit v1.2.1