summaryrefslogtreecommitdiff
path: root/build/build.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-05-08 20:39:29 +0000
committerjbj <devnull@localhost>2003-05-08 20:39:29 +0000
commit9c5529608e389271b80469054bfe80737521590a (patch)
treeb1df8b79cd3fdbb7f10d3b48ee25fddb66072fe3 /build/build.c
parentdb7ab2f447ee6097b2e98a526f6383a5ca388718 (diff)
downloadlibrpm-tizen-9c5529608e389271b80469054bfe80737521590a.tar.gz
librpm-tizen-9c5529608e389271b80469054bfe80737521590a.tar.bz2
librpm-tizen-9c5529608e389271b80469054bfe80737521590a.zip
- don't use error string after gzclose (Dmitry V. Levin).
Spliddles for rpmio, drill h_errno all the way through. CVS patchset: 6826 CVS date: 2003/05/08 20:39:29
Diffstat (limited to 'build/build.c')
-rw-r--r--build/build.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/build/build.c b/build/build.c
index a68de293e..953aa314a 100644
--- a/build/build.c
+++ b/build/build.c
@@ -20,7 +20,7 @@ static int _build_debug = 0;
/**
*/
static void doRmSource(Spec spec)
- /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
{
struct Source *p;
@@ -119,6 +119,8 @@ int doScript(Spec spec, int what, const char *name, StringBuf sb, int test)
mPost = "%{___build_post}";
break;
}
+ if (name == NULL) /* XXX shouldn't happen */
+ name = "???";
/*@=branchstate@*/
if ((what != RPMBUILD_RMBUILD) && sb == NULL) {
@@ -175,7 +177,7 @@ int doScript(Spec spec, int what, const char *name, StringBuf sb, int test)
if (what == RPMBUILD_RMBUILD) {
if (spec->buildSubdir)
fprintf(fp, "rm -rf %s\n", spec->buildSubdir);
- } else
+ } else if (sb != NULL)
fprintf(fp, "%s", getStringBuf(sb));
(void) fputs(buildPost, fp);