summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2000-03-23 15:49:50 +0000
committerjbj <devnull@localhost>2000-03-23 15:49:50 +0000
commitcab176172b8ef247f24e5aa0928c3aa0b8adabd9 (patch)
treea76b37e5b22003d56ec39a8128ee794080be4ec0 /build
parent46e17d7a2d27cb91d1c930de46c0a8026410b0d5 (diff)
downloadlibrpm-tizen-cab176172b8ef247f24e5aa0928c3aa0b8adabd9.tar.gz
librpm-tizen-cab176172b8ef247f24e5aa0928c3aa0b8adabd9.tar.bz2
librpm-tizen-cab176172b8ef247f24e5aa0928c3aa0b8adabd9.zip
- API: change dbi to pass by reference, not value.
- cram all of db1, db_185, and db2 interfaces into rpmlib. CVS patchset: 3636 CVS date: 2000/03/23 15:49:50
Diffstat (limited to 'build')
-rw-r--r--build/parsePreamble.c7
-rw-r--r--build/spec.c5
2 files changed, 5 insertions, 7 deletions
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index 98bd7903e..acb1433d4 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -47,9 +47,8 @@ static void addOrAppendListEntry(Header h, int_32 tag, char *line)
const char **argv;
poptParseArgvString(line, &argc, &argv);
- if (argc) {
+ if (argc)
headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE, argv, argc);
- }
FREE(argv);
}
@@ -168,7 +167,7 @@ static int checkForValidArchitectures(Spec spec)
return 0;
}
-static int checkForRequired(Header h, char *name)
+static int checkForRequired(Header h, const char *name)
{
int res = 0;
int *p;
@@ -184,7 +183,7 @@ static int checkForRequired(Header h, char *name)
return res;
}
-static int checkForDuplicates(Header h, char *name)
+static int checkForDuplicates(Header h, const char *name)
{
int res = 0;
int lastTag, tag;
diff --git a/build/spec.c b/build/spec.c
index 113809f8d..feb0b4ed7 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -174,9 +174,8 @@ void freePackages(Spec spec)
{
Package p;
- while (spec->packages) {
- p = spec->packages;
- spec->packages = spec->packages->next;
+ while ((p = spec->packages) != NULL) {
+ spec->packages = p->next;
p->next = NULL;
freePackage(p);
}