[PATCH 2/2] Disambiguate PREFIX define in sideband.c
- From
Vincent van Ravesteijn <vfr@lyx.org>
- Date
- Mar 6, 2012, 08:54 UTC
- Message-ID
- <1331024077-5736-2-git-send-email-user@vincent-VirtualBox>
- 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