summaryrefslogtreecommitdiff
path: root/hlink.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-12-04 02:07:37 +0000
committerWayne Davison <wayned@samba.org>2006-12-04 02:07:37 +0000
commit663b2857ebe84df29c10c17c818040ceb9569593 (patch)
tree46bb11b86a0129d06e8a4e3fbe64b3b57995ff42 /hlink.c
parent155d9206a4d5b199d056b2932c62c292e58c0d69 (diff)
downloadrsync-663b2857ebe84df29c10c17c818040ceb9569593.tar.gz
rsync-663b2857ebe84df29c10c17c818040ceb9569593.tar.bz2
rsync-663b2857ebe84df29c10c17c818040ceb9569593.zip
Use new send_msg_int() function.
Diffstat (limited to 'hlink.c')
-rw-r--r--hlink.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/hlink.c b/hlink.c
index d4808fc9..8ef8c2ab 100644
--- a/hlink.c
+++ b/hlink.c
@@ -50,10 +50,10 @@ static int hlink_compare(int *int1, int *int2)
struct idev *i2 = F_IDEV(f2);
if (i1->dev != i2->dev)
- return (int)(i1->dev > i2->dev ? 1 : -1);
+ return i1->dev > i2->dev ? 1 : -1;
if (i1->ino != i2->ino)
- return (int)(i1->ino > i2->ino ? 1 : -1);
+ return i1->ino > i2->ino ? 1 : -1;
return f_name_cmp(f1, f2);
}
@@ -245,11 +245,8 @@ int hard_link_check(struct file_struct *file, int ndx, char *fname,
}
maybe_hard_link(file, ndx, fname, statret, st,
toname, &st2, itemizing, code);
- if (remove_source_files == 1 && do_xfers) {
- char numbuf[4];
- SIVAL(numbuf, 0, ndx);
- send_msg(MSG_SUCCESS, numbuf, 4);
- }
+ if (remove_source_files == 1 && do_xfers)
+ send_msg_int(MSG_SUCCESS, ndx);
hl->hlindex = FINISHED_LINK;
} else
hl->hlindex = SKIPPED_LINK;
@@ -320,11 +317,8 @@ void hard_link_cluster(struct file_struct *file, int master, int itemizing,
statret = link_stat(hlink2, &st2, 0);
maybe_hard_link(file, ndx, hlink2, statret, &st2,
hlink1, &st1, itemizing, code);
- if (remove_source_files == 1 && do_xfers) {
- char numbuf[4];
- SIVAL(numbuf, 0, ndx);
- send_msg(MSG_SUCCESS, numbuf, 4);
- }
+ if (remove_source_files == 1 && do_xfers)
+ send_msg_int(MSG_SUCCESS, ndx);
hl->hlindex = FINISHED_LINK;
} while (!(file->flags & FLAG_HLINK_LAST));
#endif