aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2018-04-05 14:43:59 +0200
committerFabian Groffen <grobian@gentoo.org>2018-04-05 14:43:59 +0200
commit85f7604d713d1c7fce3ea31798faee4487a90dc7 (patch)
treef4ae925f9f4c8c33b7df874a641be67c636ec7a7
parenttests: silence unused function warnings (diff)
downloadportage-utils-85f7604d713d1c7fce3ea31798faee4487a90dc7.tar.gz
portage-utils-85f7604d713d1c7fce3ea31798faee4487a90dc7.tar.bz2
portage-utils-85f7604d713d1c7fce3ea31798faee4487a90dc7.zip
atom_explode: properly set fields for no-version case
atom_explode/basic test wasn't run due to no dependencies in Makefile, hence I didn't see this before
-rw-r--r--libq/atom_explode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libq/atom_explode.c b/libq/atom_explode.c
index e52f149..faf24ff 100644
--- a/libq/atom_explode.c
+++ b/libq/atom_explode.c
@@ -200,6 +200,8 @@ atom_explode(const char *atom)
if (ptr == NULL) {
/* atom has no version, this is it */
+ strcpy(ret->P, ret->PN);
+ ret->PVR = NULL;
return ret;
}
ret->PV = ptr;