OSSP CVS Repository

ossp - Difference in ossp-pkg/rc/rc_sect.c versions 1.16 and 1.17
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/rc/rc_sect.c 1.16 -> 1.17

--- rc_sect.c    2003/06/27 14:26:13     1.16
+++ rc_sect.c    2003/06/30 14:43:36     1.17
@@ -159,15 +159,25 @@
     return(0); /* Not reached */
 }
 
+rc_script_t *sectionGetscript(rc_section_t *pSec)
+{
+    if (pSec)
+        return(pSec->m_pData);
+    else
+        RC_THROW(RC_ERR_USE);
+
+    return(0); /* Not reached */
+}
+
 const char *sectionGetdata(rc_section_t *pSec)
 { /* Data of section, this is the script body of the particular section */
-    char *szScriptdata = NULL;
-
-    if (pSec && (szScriptdata = scriptGetdata(pSec->m_pData)))
-        if (strlen(szScriptdata) > 0)
-            return(szScriptdata);
+    if (pSec) {
+        const char *kszScriptdata = scriptGetdata(pSec->m_pData);
+        if (kszScriptdata && strlen(kszScriptdata) > 0)
+            return(kszScriptdata);
         else
             return NULL;
+    }
     else
         RC_THROW(RC_ERR_USE);
 

CVSTrac 2.0.1