From eb0487b00f6ff4d2912e3fef250d8467007ff434 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 17 Apr 2019 13:47:16 +0300 Subject: [PATCH] Port parseFiles() to use parseLines(), no functional changes --- build/parseFiles.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/build/parseFiles.c b/build/parseFiles.c index 5ccc94509..69935d423 100644 --- a/build/parseFiles.c +++ b/build/parseFiles.c @@ -12,7 +12,7 @@ int parseFiles(rpmSpec spec) { - int nextPart, res = PART_ERROR; + int res = PART_ERROR; Package pkg; int rc, argc; int arg; @@ -84,23 +84,7 @@ int parseFiles(rpmSpec spec) } pkg->fileList = argvNew(); - - 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; + res = parseLines(spec, STRIP_COMMENTS, &(pkg->fileList), NULL); exit: rpmPopMacro(NULL, "license");