Skip to content

Commit 3f80f07

Browse files
committed
libq/atom: fix two issues in atom_clone
- retain version suffix (instead of duplicating the prefix) - copy usedeps into the new atom (iso old, thus loose it) Signed-off-by: Fabian Groffen <grobian@gentoo.org>
1 parent e612bf5 commit 3f80f07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libq/atom.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ atom_clone(depend_atom *atom)
491491

492492
ret->blocker = atom->blocker;
493493
ret->pfx_op = atom->pfx_op;
494-
ret->sfx_op = atom->pfx_op;
494+
ret->sfx_op = atom->sfx_op;
495495
ret->PR_int = atom->PR_int;
496496
ret->letter = atom->letter;
497497
ret->slotdep = atom->slotdep;
@@ -512,7 +512,7 @@ atom_clone(depend_atom *atom)
512512
for (w = atom->usedeps; w != NULL; w = w->next) {
513513
nlen = w->use != NULL ? strlen(w->use) + 1 : 0;
514514
if (n == NULL) {
515-
atom->usedeps = n = xmalloc(sizeof(*n) + nlen);
515+
ret->usedeps = n = xmalloc(sizeof(*n) + nlen);
516516
} else {
517517
n = n->next = xmalloc(sizeof(*n) + nlen);
518518
}

0 commit comments

Comments
 (0)