diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-05 11:31:09 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-05 11:31:09 +0300 |
commit | d0ea38a4cae75a6c69536e3949e230f3999ae7d1 (patch) | |
tree | 7c4989bd22d0986e9de6672c9da4a2515b7675aa /build | |
parent | 557c2673f7e7ff222f8abcc35ecd601007374b6f (diff) | |
download | rpm-d0ea38a4cae75a6c69536e3949e230f3999ae7d1.tar.gz rpm-d0ea38a4cae75a6c69536e3949e230f3999ae7d1.tar.bz2 rpm-d0ea38a4cae75a6c69536e3949e230f3999ae7d1.zip |
Make readLine() return PART_ERROR on errors
Diffstat (limited to 'build')
-rw-r--r-- | build/parseSpec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/build/parseSpec.c b/build/parseSpec.c index 54465e270..6215bf4ed 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -226,7 +226,7 @@ retry: /* XXX Fstrerror */ rpmlog(RPMLOG_ERR, _("Unable to open %s: %s\n"), ofi->fileName, Fstrerror(ofi->fd)); - return RPMRC_FAIL; + return PART_ERROR; } spec->lineNum = ofi->lineNum = 0; } @@ -238,7 +238,7 @@ retry: /* EOF */ if (spec->readStack->next) { rpmlog(RPMLOG_ERR, _("Unclosed %%if\n")); - return RPMRC_FAIL; + return PART_ERROR; } /* remove this file from the stack */ @@ -328,7 +328,7 @@ int readLine(rpmSpec spec, int strip) rpmlog(RPMLOG_ERR, _("%s:%d: parseExpressionBoolean returns %d\n"), ofi->fileName, ofi->lineNum, match); - return RPMRC_FAIL; + return PART_ERROR; } } else if (! strncmp("%else", s, sizeof("%else")-1)) { s += 5; @@ -337,7 +337,7 @@ int readLine(rpmSpec spec, int strip) rpmlog(RPMLOG_ERR, _("%s:%d: Got a %%else with no %%if\n"), ofi->fileName, ofi->lineNum); - return RPMRC_FAIL; + return PART_ERROR; } spec->readStack->reading = spec->readStack->next->reading && ! spec->readStack->reading; @@ -349,7 +349,7 @@ int readLine(rpmSpec spec, int strip) rpmlog(RPMLOG_ERR, _("%s:%d: Got a %%endif with no %%if\n"), ofi->fileName, ofi->lineNum); - return RPMRC_FAIL; + return PART_ERROR; } rl = spec->readStack; spec->readStack = spec->readStack->next; @@ -362,7 +362,7 @@ int readLine(rpmSpec spec, int strip) fileName = s; if (! risspace(*fileName)) { rpmlog(RPMLOG_ERR, _("malformed %%include statement\n")); - return RPMRC_FAIL; + return PART_ERROR; } SKIPSPACE(fileName); endFileName = fileName; @@ -371,7 +371,7 @@ int readLine(rpmSpec spec, int strip) SKIPSPACE(p); if (*p != '\0') { rpmlog(RPMLOG_ERR, _("malformed %%include statement\n")); - return RPMRC_FAIL; + return PART_ERROR; } *endFileName = '\0'; |