rem: if ((statret = link_stat(hlink2, &st2, 0)) == 0) { if (st2.st_dev == st1.st_dev && st2.st_ino == st1.st_ino) { if (itemizing) { itemize(file, ndx, statret, &st2, ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0, ""); } continue; } if (make_backups) { if (!make_backup(hlink2)) continue; } else if (robust_unlink(hlink2)) { if (verbose > 0) { rsyserr(FINFO, errno, "unlink %s failed", full_fname(hlink2)); } continue; } } hard_link_one(file, ndx, hlink2, statret, &st2, hlink1, 0, itemizing, code);
add: statret = link_stat(hlink2, &st2, 0); maybe_hard_link(file, ndx, hlink2, statret, &st2, hlink1, &st1, itemizing, code); file->F_HLINDEX = FINISHED_LINK;
context: void hard_link_cluster(struct file_struct *file, int master, int itemizing,		       enum logcode code){#ifdef SUPPORT_HARD_LINKS	char hlink1[MAXPATHLEN];	char *hlink2;	STRUCT_STAT st1, st2;	int statret, ndx = master;	if (link_stat(f_name_to(file, hlink1), &st1, 0) < 0)		return;	if (!(file->flags & FLAG_HLINK_TOL)) {		while (!(file->flags & FLAG_HLINK_EOL)) {			ndx = file->F_NEXT;			file = FPTR(ndx);		}	}	do {		ndx = file->F_NEXT;		file = FPTR(ndx);		if (ndx == master)			continue;		hlink2 = f_name(file);		if ((statret = link_stat(hlink2, &st2, 0)) == 0) {			if (st2.st_dev == st1.st_dev			    && st2.st_ino == st1.st_ino) {				if (itemizing) {					itemize(file, ndx, statret, &st2,						ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS,						0, "");				}				continue;			}			if (make_backups) {				if (!make_backup(hlink2))					continue;			} else if (robust_unlink(hlink2)) {				if (verbose > 0) {					rsyserr(FINFO, errno,						"unlink %s failed",						full_fname(hlink2));				}				continue;			}		}		hard_link_one(file, ndx, hlink2, statret,			      &st2, hlink1, 0, itemizing, code);	} while (!(file->flags & FLAG_HLINK_EOL));#endif}