Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
db22e586
Commit
db22e586
authored
May 29, 2010
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure our idev_find() hashtable use is right.
parent
60c25caa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
hlink.c
hlink.c
+5
-4
No files found.
hlink.c
View file @
db22e586
...
...
@@ -57,7 +57,7 @@ static struct file_list *hlink_flist;
void
init_hard_links
(
void
)
{
if
(
am_sender
||
protocol_version
<
30
)
dev_tbl
=
hashtable_create
(
16
,
SIZEOF_INT64
==
8
);
dev_tbl
=
hashtable_create
(
16
,
1
);
else
if
(
inc_recurse
)
prior_hlinks
=
hashtable_create
(
1024
,
0
);
}
...
...
@@ -67,11 +67,12 @@ struct ht_int64_node *idev_find(int64 dev, int64 ino)
static
struct
ht_int64_node
*
dev_node
=
NULL
;
struct
hashtable
*
tbl
;
if
(
!
dev_node
||
dev_node
->
key
!=
dev
)
{
/* Note that some OSes have a dev == 0, so increment to avoid storing a 0. */
if
(
!
dev_node
||
dev_node
->
key
!=
dev
+
1
)
{
/* We keep a separate hash table of inodes for every device. */
dev_node
=
hashtable_find
(
dev_tbl
,
dev
,
1
);
dev_node
=
hashtable_find
(
dev_tbl
,
dev
+
1
,
1
);
if
(
!
(
tbl
=
dev_node
->
data
))
{
tbl
=
dev_node
->
data
=
hashtable_create
(
512
,
SIZEOF_INT64
==
8
);
tbl
=
dev_node
->
data
=
hashtable_create
(
512
,
1
);
if
(
DEBUG_GTE
(
HLINK
,
3
))
{
rprintf
(
FINFO
,
"[%s] created hashtable for dev %s
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment