Port parseFiles() to use parseLines(), no functional changes

This commit is contained in:
Panu Matilainen 2019-04-17 13:47:16 +03:00 committed by Florian Festi
parent a6c2e3f837
commit eb0487b00f
1 changed files with 2 additions and 18 deletions

View File

@ -12,7 +12,7 @@
int parseFiles(rpmSpec spec) int parseFiles(rpmSpec spec)
{ {
int nextPart, res = PART_ERROR; int res = PART_ERROR;
Package pkg; Package pkg;
int rc, argc; int rc, argc;
int arg; int arg;
@ -84,23 +84,7 @@ int parseFiles(rpmSpec spec)
} }
pkg->fileList = argvNew(); pkg->fileList = argvNew();
res = parseLines(spec, STRIP_COMMENTS, &(pkg->fileList), NULL);
if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
nextPart = PART_NONE;
} else if (rc < 0) {
goto exit;
} else {
while (! (nextPart = isPart(spec->line))) {
argvAdd(&(pkg->fileList), spec->line);
if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) {
nextPart = PART_NONE;
break;
} else if (rc < 0) {
goto exit;
}
}
}
res = nextPart;
exit: exit:
rpmPopMacro(NULL, "license"); rpmPopMacro(NULL, "license");