Skip to content
Snippets Groups Projects
Commit bf8068b6 authored by Yorhel's avatar Yorhel
Browse files

Slightly improve hardlink circular list insertion performance

parent d95c65b0
No related branches found
No related tags found
No related merge requests found
...@@ -67,10 +67,8 @@ static void hlink_check(struct dir *d) { ...@@ -67,10 +67,8 @@ static void hlink_check(struct dir *d) {
/* found in the table? update hlnk */ /* found in the table? update hlnk */
if(!i) { if(!i) {
t = d->hlnk = kh_key(links, k); t = kh_key(links, k);
if(t->hlnk != NULL) d->hlnk = t->hlnk == NULL ? t : t->hlnk;
for(t=t->hlnk; t->hlnk!=d->hlnk; t=t->hlnk)
;
t->hlnk = d; t->hlnk = d;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment