ossp-pkg/rc/rc_proc.c 1.22 -> 1.23
--- rc_proc.c 2003/05/15 12:49:11 1.22
+++ rc_proc.c 2003/05/15 22:22:30 1.23
@@ -193,7 +193,8 @@
************************************************/
rc_return_t procRun(rc_proc_t *pRc)
{
- int nIter = 0;
+ int nIter = 0;
+ int nTotsecs = pRc->m_pAnal->m_nRcs * pRc->m_pAnal->m_nSecs;
char *pszVec[RC_EXEC_MAXARGS];
/****************************************************/
@@ -213,10 +214,12 @@
TRACE("Bad, execvp in child returned -1");
}
else if (configGetval(RC_PRN_VAL)) { /* Print */
+ qsort((void *)pRc->m_ppSectvec, (size_t)nTotsecs, sizeof (rc_section_t *), priCompare);
scriptDump(pRc->m_pScriptcom);
- for (nIter = 0; nIter < pRc->m_pAnal->m_nRcs * pRc->m_pAnal->m_nSecs; nIter++)
+ for (nIter = 0; nIter < nTotsecs; nIter++) {
if (pRc->m_ppSectvec[nIter])
sectionDump(pRc->m_ppSectvec[nIter]);
+ }
}
else /* Something is wrong here */
return(RC_THROW(RC_ERR_INT));
|
|