From 7e595f4ba400b32ece930de0847d994f6f2fbe24 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 3 Jan 2024 20:20:20 +0100 Subject: unique id maybe? --- c_ldirs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'c_ldirs.go') diff --git a/c_ldirs.go b/c_ldirs.go index 185d2a0..b647944 100644 --- a/c_ldirs.go +++ b/c_ldirs.go @@ -70,6 +70,7 @@ type DirsList struct { func (ldirs *DirsList) add_back(node *DirsNode) { new_node := node + new_node.ID = global_id if ldirs.head == nil { ldirs.head = new_node ldirs.last = ldirs.head @@ -79,7 +80,6 @@ func (ldirs *DirsList) add_back(node *DirsNode) { // for curr.next != nil { // curr = curr.next // } - new_node.ID = curr.ID + 1 curr.next = new_node ldirs.last = curr.next } -- cgit v1.2.3