summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
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);
}