From 9c5529608e389271b80469054bfe80737521590a Mon Sep 17 00:00:00 2001 From: jbj Date: Thu, 8 May 2003 20:39:29 +0000 Subject: - 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 --- build/build.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build/build.c') 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); -- cgit v1.2.3