From 51ae7c0fb086b6467a55a40f3a30e6fb8621dbd6 Mon Sep 17 00:00:00 2001 From: jbj Date: Sat, 27 Dec 2003 02:40:25 +0000 Subject: [PATCH] splint fiddles. CVS patchset: 7030 CVS date: 2003/12/27 02:40:25 --- lib/psm.c | 5 ++++- popt/popt.c | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/psm.c b/lib/psm.c index 79b4840..df43b10 100644 --- a/lib/psm.c +++ b/lib/psm.c @@ -680,8 +680,11 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln, xx = Fclose (out); if (sfdno > STDERR_FILENO) xx = Fclose (scriptFd); - else + else { +/*@-usereleased@*/ xx = Fclose(out); +/*@=usereleased@*/ + } } { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL); diff --git a/popt/popt.c b/popt/popt.c index 357e01b..5226062 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -70,8 +70,10 @@ static void invokeCallbacksPRE(poptContext con, const struct poptOption * opt) if (opt->arg == NULL) continue; /* XXX program error. */ if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { void * arg = opt->arg; +/*@-branchstate@*/ /* XXX sick hack to preserve pretense of ABI. */ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N; +/*@=branchstate@*/ /* Recurse on included sub-tables. */ invokeCallbacksPRE(con, arg); } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK && @@ -96,8 +98,10 @@ static void invokeCallbacksPOST(poptContext con, const struct poptOption * opt) if (opt->arg == NULL) continue; /* XXX program error. */ if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { void * arg = opt->arg; +/*@-branchstate@*/ /* XXX sick hack to preserve pretense of ABI. */ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N; +/*@=branchstate@*/ /* Recurse on included sub-tables. */ invokeCallbacksPOST(con, arg); } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK && @@ -126,8 +130,10 @@ static void invokeCallbacksOPTION(poptContext con, for (; opt->longName || opt->shortName || opt->arg; opt++) { if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) { void * arg = opt->arg; +/*@-branchstate@*/ /* XXX sick hack to preserve pretense of ABI. */ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N; +/*@=branchstate@*/ /* Recurse on included sub-tables. */ if (opt->arg != NULL) /* XXX program error */ invokeCallbacksOPTION(con, opt->arg, myOpt, myData, shorty); @@ -482,8 +488,10 @@ findOption(const struct poptOption * opt, /*@null@*/ const char * longName, const struct poptOption * opt2; void * arg = opt->arg; +/*@-branchstate@*/ /* XXX sick hack to preserve pretense of ABI. */ if (arg == poptHelpOptions) arg = poptHelpOptionsI18N; +/*@=branchstate@*/ /* Recurse on included sub-tables. */ if (arg == NULL) continue; /* XXX program error */ opt2 = findOption(arg, longName, shortName, callback, -- 2.7.4