Skip to content

Commit d433ed0

Browse files
René Scharfegitster
authored andcommitted
daemon: inline fill_in_extra_table_entries()
Having fill_in_extra_table_entries() as a separate function has no advantage -- a function with no parameters and return values might as well be an anonymous block of code. Its name still refers to the table of interpolate() which has been removed earlier, so it's better to inline it at its only call site. Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9d7ca66 commit d433ed0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

daemon.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ static void parse_extra_args(char *extra_args, int buflen)
414414
char *val;
415415
int vallen;
416416
char *end = extra_args + buflen;
417+
char *hp;
417418

418419
while (extra_args < end && *extra_args) {
419420
saw_extended_args = 1;
@@ -438,11 +439,6 @@ static void parse_extra_args(char *extra_args, int buflen)
438439
extra_args = val + vallen;
439440
}
440441
}
441-
}
442-
443-
static void fill_in_extra_table_entries(void)
444-
{
445-
char *hp;
446442

447443
/*
448444
* Replace literal host with lowercase-ized hostname.
@@ -562,10 +558,8 @@ static int execute(struct sockaddr *addr)
562558
free(directory);
563559
hostname = canon_hostname = ip_address = tcp_port = directory = NULL;
564560

565-
if (len != pktlen) {
561+
if (len != pktlen)
566562
parse_extra_args(line + len + 1, pktlen - len - 1);
567-
fill_in_extra_table_entries();
568-
}
569563

570564
for (i = 0; i < ARRAY_SIZE(daemon_service); i++) {
571565
struct daemon_service *s = &(daemon_service[i]);

0 commit comments

Comments
 (0)