projects
/
platform
/
upstream
/
libsolv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebfee3e
)
improve pool_solvable2str output if the evr or arch is empty
author
Michael Schroeder
<mls@suse.de>
Wed, 20 Mar 2013 10:26:28 +0000
(11:26 +0100)
committer
Michael Schroeder
<mls@suse.de>
Wed, 20 Mar 2013 10:26:28 +0000
(11:26 +0100)
src/solvable.c
patch
|
blob
|
history
diff --git
a/src/solvable.c
b/src/solvable.c
index
7ac79ee
..
8f4b9b9
100644
(file)
--- a/
src/solvable.c
+++ b/
src/solvable.c
@@
-46,10
+46,16
@@
pool_solvable2str(Pool *pool, Solvable *s)
}
p = pool_alloctmpspace(pool, nl + el + al + 3);
strcpy(p, n);
- p[nl] = '-';
- strncpy(p + nl + 1, e, el);
- p[nl + 1 + el] = '.';
- strcpy(p + nl + 1 + el + 1, a);
+ if (el)
+ {
+ p[nl++] = '-';
+ strncpy(p + nl, e, el);
+ }
+ if (al)
+ {
+ p[nl + el] = '.';
+ strcpy(p + nl + el + 1, a);
+ }
return p;
}