git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>, Jon Loeliger <jdl@freescale.com>
Subject: [PATCH 3.1/4] daemon: inline fill_in_extra_table_entries()
Date: Sun, 23 Nov 2008 00:19:09 +0100	[thread overview]
Message-ID: <4928936D.8010404@lsrfire.ath.cx> (raw)
In-Reply-To: <49289275.7090003@lsrfire.ath.cx>

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 <rene.scharfe@lsrfire.ath.cx>
---
 daemon.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/daemon.c b/daemon.c
index 64f60c4..fbf61ca 100644
--- a/daemon.c
+++ b/daemon.c
@@ -414,6 +414,7 @@ static void parse_extra_args(char *extra_args, int buflen)
 	char *val;
 	int vallen;
 	char *end = extra_args + buflen;
+	char *hp;
 
 	while (extra_args < end && *extra_args) {
 		saw_extended_args = 1;
@@ -438,11 +439,6 @@ static void parse_extra_args(char *extra_args, int buflen)
 			extra_args = val + vallen;
 		}
 	}
-}
-
-static void fill_in_extra_table_entries(void)
-{
-	char *hp;
 
 	/*
 	 * Replace literal host with lowercase-ized hostname.
@@ -562,10 +558,8 @@ static int execute(struct sockaddr *addr)
 	free(directory);
 	hostname = canon_hostname = ip_address = tcp_port = directory = NULL;
 
-	if (len != pktlen) {
+	if (len != pktlen)
 		parse_extra_args(line + len + 1, pktlen - len - 1);
-		fill_in_extra_table_entries();
-	}
 
 	for (i = 0; i < ARRAY_SIZE(daemon_service); i++) {
 		struct daemon_service *s = &(daemon_service[i]);
-- 
1.6.0.4.755.g6e139

  parent reply	other threads:[~2008-11-22 23:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-22 23:09 [PATCH 1/4] add strbuf_expand_dict_cb(), a helper for simple cases René Scharfe
2008-11-22 23:13 ` [PATCH 2/4] merge-recursive: use strbuf_expand() instead of interpolate() René Scharfe
2008-11-22 23:15   ` [PATCH 3/4] daemon: " René Scharfe
2008-11-22 23:16     ` [PATCH 4/4] remove the unused files interpolate.c and interpolate.h René Scharfe
2008-11-22 23:19     ` René Scharfe [this message]
2008-11-22 23:21       ` [PATCH 3.2/4] daemon: deglobalize variable 'directory' René Scharfe
2008-12-04 20:30 ` [PATCH 1/4] add strbuf_expand_dict_cb(), a helper for simple cases Jon Loeliger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4928936D.8010404@lsrfire.ath.cx \
    --to=rene.scharfe@lsrfire.ath.cx \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jdl@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).