Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
11dc274
)
Cosmetic changes to file_compare() for readability and to
author
J.W. Schultz
<jw@samba.org>
Wed, 7 Jan 2004 09:11:56 +0000
(09:11 +0000)
committer
J.W. Schultz
<jw@samba.org>
Wed, 7 Jan 2004 09:11:56 +0000
(09:11 +0000)
match hlink_compare()
flist.c
patch
|
blob
|
blame
|
history
diff --git
a/flist.c
b/flist.c
index
5204ee6
..
a14ce5f
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-1158,17
+1158,20
@@
struct file_list *recv_file_list(int f)
}
}
-int file_compare(struct file_struct **f
1, struct file_struct **f
2)
+int file_compare(struct file_struct **f
ile1, struct file_struct **file
2)
{
{
- if (!(*f1)->basename && !(*f2)->basename)
+ struct file_struct *f1 = *file1;
+ struct file_struct *f2 = *file2;
+
+ if (!f1->basename && !f2->basename)
return 0;
return 0;
- if (!
(*f1)
->basename)
+ if (!
f1
->basename)
return -1;
return -1;
- if (!
(*f2)
->basename)
+ if (!
f2
->basename)
return 1;
return 1;
- if (
(*f1)->dirname == (*f2)
->dirname)
- return u_strcmp(
(*f1)->basename, (*f2)
->basename);
- return f_name_cmp(
*f1, *
f2);
+ if (
f1->dirname == f2
->dirname)
+ return u_strcmp(
f1->basename, f2
->basename);
+ return f_name_cmp(
f1,
f2);
}
}