AI inspired fixes

This commit is contained in:
bol-van
2026-01-07 13:41:17 +03:00
parent 3e35fb9025
commit 6ac8ed4c3f
9 changed files with 8 additions and 92 deletions

View File

@@ -289,14 +289,14 @@ struct desync_profile_list *dp_list_add(struct desync_profile_list_head *head)
dp_init(&entry->dp);
// add to the tail
struct desync_profile_list *dpn,*dpl=LIST_FIRST(&params.desync_profiles);
struct desync_profile_list *dpn,*dpl=LIST_FIRST(head);
if (dpl)
{
while ((dpn=LIST_NEXT(dpl,next))) dpl = dpn;
LIST_INSERT_AFTER(dpl, entry, next);
}
else
LIST_INSERT_HEAD(&params.desync_profiles, entry, next);
LIST_INSERT_HEAD(head, entry, next);
return entry;
}