diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2019-04-17 13:46:48 +0300 |
---|---|---|
committer | Florian Festi <ffesti@redhat.com> | 2019-04-17 13:18:50 +0200 |
commit | a6c2e3f83748efab413c9914fa3a74aa49852c7e (patch) | |
tree | 4435af775cb66e65f30b02c91e7f3adfcdf1d260 /build/parseDescription.c | |
parent | bb6786788cb1b1d7f2d583c9a5b7767cbda1154e (diff) | |
download | rpm-a6c2e3f83748efab413c9914fa3a74aa49852c7e.tar.gz |
Port parseDescription() to use parseLines(), no functional changes
Diffstat (limited to 'build/parseDescription.c')
-rw-r--r-- | build/parseDescription.c | 24 |
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)) { |