summaryrefslogtreecommitdiff
path: root/compat.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2007-09-09 07:52:59 +0000
committerWayne Davison <wayned@samba.org>2007-09-09 07:52:59 +0000
commitac593860274252843d9fa5bddc8dc9371135b7c5 (patch)
tree44f536f64c56f3633aec29e4e0dd03b6e4be2afc /compat.c
parent73a649b7cb5369f7e3994406f2dfa3b640b10fe8 (diff)
downloadrsync-ac593860274252843d9fa5bddc8dc9371135b7c5.tar.gz
Used a couple "#if SUBPROTOCOL_VERSION != 0" conditionals.
Diffstat (limited to 'compat.c')
-rw-r--r--compat.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/compat.c b/compat.c
index aa32de8e..fb002746 100644
--- a/compat.c
+++ b/compat.c
@@ -67,13 +67,19 @@ static void check_sub_protocol(void)
{
char *dot;
int their_protocol, their_sub;
+#if SUBPROTOCOL_VERSION != 0
int our_sub = protocol_version < PROTOCOL_VERSION ? 0 : SUBPROTOCOL_VERSION;
+#else
+ int our_sub = 0;
+#endif
if (!shell_cmd || !(dot = strchr(shell_cmd, '.'))
|| !(their_protocol = atoi(shell_cmd))
|| !(their_sub = atoi(dot+1))) {
+#if SUBPROTOCOL_VERSION != 0
if (our_sub)
protocol_version--;
+#endif
return;
}
@@ -84,7 +90,7 @@ static void check_sub_protocol(void)
}
if (their_protocol > protocol_version)
- their_sub = 0; /* 0 == final version */
+ their_sub = 0; /* 0 == final version of older protocol */
if (their_sub != our_sub)
protocol_version--;
}