git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent van Ravesteijn <vfr@lyx.org>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Vincent van Ravesteijn <vfr@lyx.org>
Subject: [PATCH 2/2] Disambiguate PREFIX define in sideband.c
Date: Tue,  6 Mar 2012 09:54:37 +0100	[thread overview]
Message-ID: <1331024077-5736-2-git-send-email-user@vincent-VirtualBox> (raw)
In-Reply-To: <1331024077-5736-1-git-send-email-user@vincent-VirtualBox>

From: Vincent van Ravesteijn <vfr@lyx.org>

PREFIX is already used as the prefix for the system path in system_path(..)
in exec_cmd.c. If PREFIX has been set, this patch prevents a warning that
PREFIX is being redefined.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
---
 sideband.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sideband.c b/sideband.c
index d5ffa1c..7c38fcb 100644
--- a/sideband.c
+++ b/sideband.c
@@ -12,7 +12,7 @@
  * the remote died unexpectedly.  A flush() concludes the stream.
  */
 
-#define PREFIX "remote:"
+#define SIDEBAND_PREFIX "remote:"
 
 #define ANSI_SUFFIX "\033[K"
 #define DUMB_SUFFIX "        "
@@ -21,13 +21,13 @@
 
 int recv_sideband(const char *me, int in_stream, int out)
 {
-	unsigned pf = strlen(PREFIX);
+	unsigned pf = strlen(SIDEBAND_PREFIX);
 	unsigned sf;
 	char buf[LARGE_PACKET_MAX + 2*FIX_SIZE];
 	char *suffix, *term;
 	int skip_pf = 0;
 
-	memcpy(buf, PREFIX, pf);
+	memcpy(buf, SIDEBAND_PREFIX, pf);
 	term = getenv("TERM");
 	if (term && strcmp(term, "dumb"))
 		suffix = ANSI_SUFFIX;
-- 
1.7.5.4

  reply	other threads:[~2012-03-06  8:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06  8:54 [PATCH 1/2] Fix a warning about conversion to float Vincent van Ravesteijn
2012-03-06  8:54 ` Vincent van Ravesteijn [this message]
2012-03-06 19:04   ` [PATCH 2/2] Disambiguate PREFIX define in sideband.c Junio C Hamano
2012-03-06 18:58 ` [PATCH 1/2] Fix a warning about conversion to float Junio C Hamano

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=1331024077-5736-2-git-send-email-user@vincent-VirtualBox \
    --to=vfr@lyx.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).