1
1

Slightly improve hardlink circular list insertion performance

Based on https://dev.yorhel.nl/ncdu/bug/124
Этот коммит содержится в:
Yorhel 2018-12-01 07:53:48 +01:00
родитель d95c65b032
Коммит bf8068b65e

Просмотреть файл

@ -67,10 +67,8 @@ static void hlink_check(struct dir *d) {
/* found in the table? update hlnk */
if(!i) {
t = d->hlnk = kh_key(links, k);
if(t->hlnk != NULL)
for(t=t->hlnk; t->hlnk!=d->hlnk; t=t->hlnk)
;
t = kh_key(links, k);
d->hlnk = t->hlnk == NULL ? t : t->hlnk;
t->hlnk = d;
}