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
Use the new HAVE_GETGROUPS define.
[rsync/rsync.git]
/
hlink.c
diff --git
a/hlink.c
b/hlink.c
index
a043550
..
2dbc0d9
100644
(file)
--- a/
hlink.c
+++ b/
hlink.c
@@
-45,7
+45,7
@@
int hlink_count;
&& (p1)->F_INODE == (p2)->F_INODE)
/* Analyze the data in the hlink_list[], remove items that aren't multiply
&& (p1)->F_INODE == (p2)->F_INODE)
/* Analyze the data in the hlink_list[], remove items that aren't multiply
- * linked, and replace the dev+inode data with the h
ead
+next linked list. */
+ * linked, and replace the dev+inode data with the h
lindex
+next linked list. */
static void link_idev_data(void)
{
struct file_struct *head;
static void link_idev_data(void)
{
struct file_struct *head;
@@
-66,7
+66,6
@@
static void link_idev_data(void)
hlink_list[from]->flags |= FLAG_HLINK_EOL;
hlink_list[to++] = head;
} else {
hlink_list[from]->flags |= FLAG_HLINK_EOL;
hlink_list[to++] = head;
} else {
- free((char*)head->link_u.idev);
head->link_u.idev = NULL;
}
}
head->link_u.idev = NULL;
}
}
@@
-77,7
+76,7
@@
static void link_idev_data(void)
} else {
hlink_count = to;
if (!(hlink_list = realloc_array(hlink_list,
} else {
hlink_count = to;
if (!(hlink_list = realloc_array(hlink_list,
-
struct file_struct *, hlink_count)))
+ struct file_struct *, hlink_count)))
out_of_memory("init_hard_links");
}
}
out_of_memory("init_hard_links");
}
}
@@
-104,7
+103,7
@@
void init_hard_links(struct file_list *flist)
}
qsort(hlink_list, hlink_count,
}
qsort(hlink_list, hlink_count,
-
sizeof(hlink_list[0])
, (int (*)()) hlink_compare);
+
sizeof hlink_list[0]
, (int (*)()) hlink_compare);
if (!hlink_count) {
free(hlink_list);
if (!hlink_count) {
free(hlink_list);
@@
-123,7
+122,7
@@
int hard_link_check(struct file_struct *file, int skip)
if (hlink_list[file->F_HLINDEX] != file) {
if (verbose > 1) {
rprintf(FINFO, "\"%s\" is a hard link\n",
if (hlink_list[file->F_HLINDEX] != file) {
if (verbose > 1) {
rprintf(FINFO, "\"%s\" is a hard link\n",
-
f_name(file));
+ f_name(file));
}
return 1;
}
}
return 1;
}
@@
-134,12
+133,12
@@
int hard_link_check(struct file_struct *file, int skip)
static void hard_link_one(char *hlink1, char *hlink2)
{
if (do_link(hlink1, hlink2)) {
static void hard_link_one(char *hlink1, char *hlink2)
{
if (do_link(hlink1, hlink2)) {
- if (verbose
> 0
) {
+ if (verbose) {
rprintf(FINFO, "link %s => %s failed: %s\n",
rprintf(FINFO, "link %s => %s failed: %s\n",
-
hlink2, hlink1, strerror(errno));
+ hlink2, hlink1, strerror(errno));
}
}
}
}
- else if (verbose
> 0
)
+ else if (verbose)
rprintf(FINFO, "%s => %s\n", hlink2, hlink1);
}
#endif
rprintf(FINFO, "%s => %s\n", hlink2, hlink1);
}
#endif
@@
-175,9
+174,9
@@
void do_hard_links(void)
if (robust_unlink(hlink2)) {
if (verbose > 0) {
rprintf(FINFO,
if (robust_unlink(hlink2)) {
if (verbose > 0) {
rprintf(FINFO,
-
"unlink %s failed: %s\n",
-
full_fname(hlink2),
-
strerror(errno));
+ "unlink %s failed: %s\n",
+ full_fname(hlink2),
+ strerror(errno));
}
continue;
}
}
continue;
}