projects
/
oweals
/
opkg-lede.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b04613
)
libopkg: fix printing provides in pkg_formatted_field()
author
Jo-Philipp Wich
<jo@mein.io>
Thu, 16 Feb 2017 11:10:16 +0000
(12:10 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Thu, 16 Feb 2017 16:02:30 +0000
(17:02 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg/pkg.c
patch
|
blob
|
history
diff --git
a/libopkg/pkg.c
b/libopkg/pkg.c
index 3633a3c932d9e3260517924a3a0528a8371fd85e..023cf75c466797960dfe9483fc2dcff1e702f486 100644
(file)
--- a/
libopkg/pkg.c
+++ b/
libopkg/pkg.c
@@
-796,10
+796,9
@@
void pkg_formatted_field(FILE * fp, pkg_t * pkg, const char *field)
ab_pkg = pkg_get_ptr(pkg, PKG_PROVIDES);
if (ab_pkg && ab_pkg[0] && ab_pkg[1]) {
fprintf(fp, "Provides:");
- for (i = 0, ab_pkg++; *ab_pkg; i++, ab_pkg++) {
- fprintf(fp, "%s %s", i == 0 ? "" : ",",
- (*ab_pkg)->name);
- ab_pkg++;
+ for (i = 1; ab_pkg[i]; i++) {
+ fprintf(fp, "%s %s", i == 1 ? "" : ",",
+ ab_pkg[i]->name);
}
fprintf(fp, "\n");
}