summaryrefslogtreecommitdiff
path: root/build/parseDescription.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2019-04-17 13:46:48 +0300
committerFlorian Festi <ffesti@redhat.com>2019-04-17 13:18:50 +0200
commita6c2e3f83748efab413c9914fa3a74aa49852c7e (patch)
tree4435af775cb66e65f30b02c91e7f3adfcdf1d260 /build/parseDescription.c
parentbb6786788cb1b1d7f2d583c9a5b7767cbda1154e (diff)
downloadrpm-a6c2e3f83748efab413c9914fa3a74aa49852c7e.tar.gz
Port parseDescription() to use parseLines(), no functional changes
Diffstat (limited to 'build/parseDescription.c')
-rw-r--r--build/parseDescription.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/build/parseDescription.c b/build/parseDescription.c
index 428821e56..2b255b514 100644
--- a/build/parseDescription.c
+++ b/build/parseDescription.c
@@ -63,27 +63,11 @@ int parseDescription(rpmSpec spec)
if (lookupPackage(spec, name, flag, &pkg))
goto exit;
- sb = newStringBuf();
-
- if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
- nextPart = PART_NONE;
- } else if (rc < 0) {
- nextPart = PART_ERROR;
- goto exit;
- } else {
- while (! (nextPart = isPart(spec->line))) {
- appendLineStringBuf(sb, spec->line);
- if ((rc =
- readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
- nextPart = PART_NONE;
- break;
- } else if (rc < 0) {
- nextPart = PART_ERROR;
- goto exit;
- }
- }
+ if ((nextPart = parseLines(spec, (STRIP_TRAILINGSPACE |STRIP_COMMENTS),
+ NULL, &sb)) == PART_ERROR) {
+ goto exit;
}
-
+
stripTrailingBlanksStringBuf(sb);
if (addLangTag(spec, pkg->header,
RPMTAG_DESCRIPTION, getStringBuf(sb), lang)) {