Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed hardlink reporting bug from TODO list -- seems to be
[rsync/rsync.git]
/
hlink.c
diff --git
a/hlink.c
b/hlink.c
index
95aa30a
..
3826ce5
100644
(file)
--- a/
hlink.c
+++ b/
hlink.c
@@
-57,9
+57,7
@@
void init_hard_links(struct file_list *flist)
if (hlink_list)
free(hlink_list);
if (hlink_list)
free(hlink_list);
- if (!(hlink_list =
- (struct file_struct *) malloc(sizeof(hlink_list[0]) *
- flist->count)))
+ if (!(hlink_list = new_array(struct file_struct, flist->count)))
out_of_memory("init_hard_links");
for (i = 0; i < flist->count; i++)
out_of_memory("init_hard_links");
for (i = 0; i < flist->count; i++)
@@
-97,6
+95,8
@@
int check_hard_link(struct file_struct *file)
low = mid + 1;
}
low = mid + 1;
}
+ /* XXX: To me this looks kind of dodgy -- why do we use [low]
+ * here and [low-1] below? -- mbp */
if (hlink_compare(&hlink_list[low], file) != 0)
return 0;
if (hlink_compare(&hlink_list[low], file) != 0)
return 0;