]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
A few superficial tweaks.
authorWayne Davison <wayne@opencoder.net>
Thu, 30 Apr 2020 02:28:23 +0000 (19:28 -0700)
committerWayne Davison <wayne@opencoder.net>
Thu, 30 Apr 2020 02:41:56 +0000 (19:41 -0700)
flist.c
io.c
rsync.h

diff --git a/flist.c b/flist.c
index f95889e906d1bda703b0701087d1e188532f5aec..1f2b278d24b824d1bbe14b18f3a5d0384edfb65b 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -2037,9 +2037,9 @@ void send_extra_file_list(int f, int at_least)
 
                if (io_error == save_io_error || ignore_errors)
                        write_end_of_flist(f, 0);
-               else if (use_safe_inc_flist) {
+               else if (use_safe_inc_flist)
                        write_end_of_flist(f, 1);
-               else {
+               else {
                        if (delete_during)
                                fatal_unsafe_io_error();
                        write_end_of_flist(f, 0);
diff --git a/io.c b/io.c
index 19ed388d6749e18b315109d3652f511f62740c56..c6d2023c73425b6128af3d062391c27e7074604f 100644 (file)
--- a/io.c
+++ b/io.c
@@ -2013,13 +2013,13 @@ void write_varint(int f, int32 x)
 {
        char b[5];
        uchar bit;
-       int cnt = 4;
+       int cnt;
 
        SIVAL(b, 1, x);
 
-       while (cnt > 1 && b[cnt] == 0)
-               cnt--;
+       for (cnt = 4; cnt > 1 && b[cnt] == 0; cnt--) {}
        bit = ((uchar)1<<(7-cnt+1));
+
        if (CVAL(b, cnt) >= bit) {
                cnt++;
                *b = ~(bit-1);
diff --git a/rsync.h b/rsync.h
index 29012d950bcbf16bad7590b0369252fcaa869479..da72dc997684e622fd2ebbc292f794c443e1de2e 100644 (file)
--- a/rsync.h
+++ b/rsync.h
 #define XMIT_IO_ERROR_ENDLIST (1<<12)  /* protocols 31*- now (w/XMIT_EXTENDED_FLAGS) (also protocol 30 w/'f' compat flag) */
 #define XMIT_MOD_NSEC (1<<13)          /* protocols 31 - now */
 #define XMIT_SAME_ATIME (1<<14)        /* any protocol - restricted by command-line option */
-#define XMIT_RESERVED_15 (1<<15)       /* reserved for future use */
+#define XMIT_UNUSED_15 (1<<15)         /* unused flag bit */
 
 /* The following XMIT flags require an rsync that uses a varint for the flag values */
 
-#define XMIT_RESERVED_16 (1<<16)       /* reserved for future use */
+#define XMIT_RESERVED_16 (1<<16)       /* reserved for future fileflags use */
+#define XMIT_RESERVED_17 (1<<17)       /* reserved for future crtimes use */
 
 /* These flags are used in the live flist data. */