Changed "count" to "used" in struct file_list since there can
[rsync/rsync.git] / rsync.c
diff --git a/rsync.c b/rsync.c
index 2352a28..fbe18c7 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -6,7 +6,7 @@
  * Copyright (C) 2003-2007 Wayne Davison
  *
  * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
+ * it under the terms of the GNU General Public License version 3 as
  * published by the Free Software Foundation.
  *
  * This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ * with this program; if not, visit the http://fsf.org website.
  */
 
 #include "rsync.h"
@@ -163,12 +162,12 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
                        continue;
                }
                ndx = NDX_FLIST_OFFSET - ndx;
-               if (ndx < 0 || ndx >= dir_flist->count) {
+               if (ndx < 0 || ndx >= dir_flist->used) {
                        ndx = NDX_FLIST_OFFSET - ndx;
                        rprintf(FERROR,
                                "[%s] Invalid dir index: %d (%d - %d)\n",
                                who_am_i(), ndx, NDX_FLIST_OFFSET,
-                               NDX_FLIST_OFFSET - dir_flist->count + 1);
+                               NDX_FLIST_OFFSET - dir_flist->used + 1);
                        exit_cleanup(RERR_PROTOCOL);
                }
 
@@ -189,7 +188,7 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
 
        /* Honor the old-style keep-alive indicator. */
        if (protocol_version < 30
-        && ndx == cur_flist->count && iflags == ITEM_IS_NEW) {
+        && ndx == cur_flist->used && iflags == ITEM_IS_NEW) {
                if (am_sender)
                        maybe_send_keepalive();
                goto read_loop;
@@ -201,7 +200,7 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr,
                        "Invalid file index: %d (%d - %d) with iflags %x [%s]\n",
                        ndx, first_flist->ndx_start + first_flist->ndx_start,
                        first_flist->prev->ndx_start + first_flist->ndx_start
-                       + first_flist->prev->count - 1, iflags, who_am_i());
+                       + first_flist->prev->used - 1, iflags, who_am_i());
                exit_cleanup(RERR_PROTOCOL);
        }
        cur_flist = flist;
@@ -501,7 +500,7 @@ struct file_list *flist_for_ndx(int ndx)
                        return NULL;
                flist = flist->prev;
        }
-       while (ndx >= flist->ndx_start + flist->count) {
+       while (ndx >= flist->ndx_start + flist->used) {
                if (!(flist = flist->next))
                        return NULL;
        }