X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/332cf6df7c32dbaa47cbfe515121da7bd53974e8..9decb4d2ef51599425f12a68dbeba2b4f3a2d908:/hlink.c?ds=sidebyside diff --git a/hlink.c b/hlink.c index 25a7ed39..b89b4d27 100644 --- a/hlink.c +++ b/hlink.c @@ -7,7 +7,7 @@ * Copyright (C) 2004-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, @@ -16,8 +16,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" @@ -225,7 +224,7 @@ static void match_gnums(int32 *ndx_list, int ndx_count) for (from = 0; from < ndx_count; from++) { for (file = cur_flist->sorted[ndx_list[from]], gnum = F_HL_GNUM(file), prev = -1; from < ndx_count-1; - file = file_next, gnum = gnum_next, from++) + file = file_next, gnum = gnum_next, from++) /*SHARED ITERATOR*/ { file_next = cur_flist->sorted[ndx_list[from+1]]; gnum_next = F_HL_GNUM(file_next); @@ -260,10 +259,10 @@ void match_hard_links(void) int i, ndx_count = 0; int32 *ndx_list; - if (!(ndx_list = new_array(int32, cur_flist->count))) + if (!(ndx_list = new_array(int32, cur_flist->used))) out_of_memory("match_hard_links"); - for (i = 0; i < cur_flist->count; i++) { + for (i = 0; i < cur_flist->used; i++) { if (F_IS_HLINKED(cur_flist->sorted[i])) ndx_list[ndx_count++] = i; }