Use the latest F_*() accessors.
[rsync/rsync.git] / hlink.c
diff --git a/hlink.c b/hlink.c
index d4808fc..2a22d27 100644 (file)
--- a/hlink.c
+++ b/hlink.c
@@ -28,7 +28,6 @@ extern int dry_run;
 extern int do_xfers;
 extern int link_dest;
 extern int make_backups;
-extern int flist_extra_ndx;
 extern int remove_source_files;
 extern int stdout_format_has_i;
 extern char *basis_dir[];
@@ -50,10 +49,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);
 }
@@ -106,7 +105,7 @@ static void link_idev_data(void)
                        file->flags |= FLAG_HLINK_LAST;
                        F_HLIST(file) = hl;
                } else
-                       file->flags &= ~FLAG_HLINK_INFO;
+                       file->flags &= ~FLAG_HLINKED;
        }
 
        if (!to) {
@@ -138,7 +137,7 @@ void init_hard_links(void)
 
        hlink_count = 0;
        for (i = 0; i < the_file_list->count; i++) {
-               if (IS_HLINKED(FPTR(i)))
+               if (F_IS_HLINKED(FPTR(i)))
                        hlink_list[hlink_count++] = i;
        }
 
@@ -245,11 +244,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 +316,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