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:
e8dbbef
)
- add repo_id2repodata, fix loop start in maybe_load_repodata()
author
Michael Schroeder
<mls@suse.de>
Fri, 23 Dec 2011 13:27:51 +0000
(14:27 +0100)
committer
Michael Schroeder
<mls@suse.de>
Fri, 23 Dec 2011 13:27:51 +0000
(14:27 +0100)
src/repo.h
patch
|
blob
|
history
src/repodata.c
patch
|
blob
|
history
diff --git
a/src/repo.h
b/src/repo.h
index
52bec4a
..
ed52d0c
100644
(file)
--- a/
src/repo.h
+++ b/
src/repo.h
@@
-74,6
+74,11
@@
static inline const char *repo_name(const Repo *repo)
return repo->name;
}
+static inline Repodata *repo_id2repodata(Repo *repo, Id id)
+{
+ return id ? repo->repodata + id : 0;
+}
+
#define FOR_REPO_SOLVABLES(r, p, s) \
for (p = (r)->start, s = (r)->pool->solvables + p; p < (r)->end; p++, s = (r)->pool->solvables + p) \
if (s->repo == (r))
diff --git
a/src/repodata.c
b/src/repodata.c
index
3753a26
..
5790f30
100644
(file)
--- a/
src/repodata.c
+++ b/
src/repodata.c
@@
-494,7
+494,7
@@
maybe_load_repodata(Repodata *data, Id keyname)
if (keyname)
{
int i;
- for (i =
0
; i < data->nkeys; i++)
+ for (i =
1
; i < data->nkeys; i++)
if (keyname == data->keys[i].name)
break;
if (i == data->nkeys)