[PATCH 2/2] Disambiguate PREFIX define in sideband.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vincent van Ravesteijn <vfr@xxxxxxx>

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@xxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]