aboutsummaryrefslogtreecommitdiffstats
path: root/hlink.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-01-11 08:17:19 +0000
committerWayne Davison <wayned@samba.org>2004-01-11 08:17:19 +0000
commitcb7fb45e4269761ad773cf04594a3284ce951b30 (patch)
tree23b2d0e9dbcfe5732d0486eb6a6e588a6d4afbbc /hlink.c
parent92cc9dd7c2c1936f8558bfada8a704c0e6e73482 (diff)
downloadandroid_external_rsync-cb7fb45e4269761ad773cf04594a3284ce951b30.tar.gz
android_external_rsync-cb7fb45e4269761ad773cf04594a3284ce951b30.tar.bz2
android_external_rsync-cb7fb45e4269761ad773cf04594a3284ce951b30.zip
Updated a questioning comment.
Diffstat (limited to 'hlink.c')
-rw-r--r--hlink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hlink.c b/hlink.c
index 289842e5..402f6c52 100644
--- a/hlink.c
+++ b/hlink.c
@@ -102,11 +102,12 @@ int check_hard_link(struct file_struct *file)
low = mid + 1;
}
- /* XXX: To me this looks kind of dodgy -- why do we use [low]
- * here and [low-1] below? -- mbp */
+ /* Check if we ended up finding the file struct or not. */
if (hlink_compare(&hlink_list[low], &file) != 0)
return 0;
+ /* Now check if the previous item shares the current one's device
+ * and inode. If so, we're not the "master", so return 1. */
if (low > 0 &&
file->F_DEV == hlink_list[low - 1]->F_DEV &&
file->F_INODE == hlink_list[low - 1]->F_INODE) {