summaryrefslogtreecommitdiff
path: root/build/parseScript.c
diff options
context:
space:
mode:
authormarc <devnull@localhost>1998-05-20 17:05:26 +0000
committermarc <devnull@localhost>1998-05-20 17:05:26 +0000
commitf0d4eed0dbd83837bc3abaf19f0c0957103a0786 (patch)
tree13e58eddf55ac3878648fb7062089b09f2b6754e /build/parseScript.c
parentc1b802dfda639c253884252835ca7f8020a56338 (diff)
downloadlibrpm-tizen-f0d4eed0dbd83837bc3abaf19f0c0957103a0786.tar.gz
librpm-tizen-f0d4eed0dbd83837bc3abaf19f0c0957103a0786.tar.bz2
librpm-tizen-f0d4eed0dbd83837bc3abaf19f0c0957103a0786.zip
Actually catch errors from readLine()
CVS patchset: 2119 CVS date: 1998/05/20 17:05:26
Diffstat (limited to 'build/parseScript.c')
-rw-r--r--build/parseScript.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/build/parseScript.c b/build/parseScript.c
index 0f195677b..cf83a925f 100644
--- a/build/parseScript.c
+++ b/build/parseScript.c
@@ -192,15 +192,21 @@ int parseScript(Spec spec, int parsePart)
}
sb = newStringBuf();
- if (readLine(spec, STRIP_NOTHING) > 0) {
+ if ((rc = readLine(spec, STRIP_NOTHING)) > 0) {
nextPart = PART_NONE;
} else {
+ if (rc) {
+ return rc;
+ }
while (! (nextPart = isPart(spec->line))) {
appendStringBuf(sb, spec->line);
- if (readLine(spec, STRIP_NOTHING) > 0) {
+ if ((rc = readLine(spec, STRIP_NOTHING)) > 0) {
nextPart = PART_NONE;
break;
}
+ if (rc) {
+ return rc;
+ }
}
}
stripTrailingBlanksStringBuf(sb);