From: Wayne Davison Date: Sun, 9 Sep 2007 07:52:59 +0000 (+0000) Subject: Used a couple "#if SUBPROTOCOL_VERSION != 0" conditionals. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/ac593860274252843d9fa5bddc8dc9371135b7c5 Used a couple "#if SUBPROTOCOL_VERSION != 0" conditionals. --- 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--; }