r8696: fixed ejs to more strictly follow the va_list rules. Might fix that
authorAndrew Tridgell <tridge@samba.org>
Fri, 22 Jul 2005 01:56:51 +0000 (01:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:29:55 +0000 (13:29 -0500)
pesky panic on x86_64
(This used to be commit 80177b29f4b32996d41a87df041c4c1bfb6876c2)

source4/lib/appweb/ejs/ejsParser.c
source4/lib/appweb/mpr/miniMpr.c

index dadd3eac11d9a163ca84e818da9f2de92b9841c3..5b8b84f7b3c0db754f3e5dbcac060f38bde777bb 100644 (file)
@@ -230,7 +230,7 @@ static int parseStmt(Ejs *ep, int state, int flags)
 
 #if BLD_DEBUG
                        fullNameLen = mprReallocStrcat(&fullName, MPR_MAX_VAR, fullNameLen,
-                               0, ".", 0);
+                               0, ".", NULL);
 #endif
 
                        ep->currentProperty = vp;
@@ -266,7 +266,7 @@ static int parseStmt(Ejs *ep, int state, int flags)
                                 *      If not executing yet, id may not be known
                                 */
                                fullNameLen = mprReallocStrcat(&fullName, MPR_MAX_VAR, 
-                                       fullNameLen, 0, "[", id, "]", 0);
+                                       fullNameLen, 0, "[", id, "]", NULL);
                        }
 #endif
 
@@ -1258,7 +1258,7 @@ static int parseId(Ejs *ep, int state, int flags, char **id, char **fullName,
        *id = mprStrdup(ep->token);
 #if BLD_DEBUG
        *fullNameLen = mprReallocStrcat(fullName, MPR_MAX_VAR, *fullNameLen,
-               0, *id, 0);
+               0, *id, NULL);
 #endif
        if (ep->currentObj == 0) {
                ep->currentObj = ejsFindObj(ep, state, *id, flags);
index 615b46bf09bdc2b214d23d50c53adfafaf4570dc..f4c219fe4c79b75c308e80c60089c6987323497e 100644 (file)
@@ -343,6 +343,7 @@ static int mprCoreStrcat(int alloc, char **destp, int destMax, int existingLen,
                addBytes += strlen(str) + sepLen;
                str = va_arg(ap, const char*);
        }
+       va_end(ap);
 
        if (existingLen > 0) {
                addBytes += sepLen;
@@ -387,6 +388,7 @@ static int mprCoreStrcat(int alloc, char **destp, int destMax, int existingLen,
                                dp += sepLen;
                        }
                }
+               va_end(ap);
        } else if (dest == 0) {
                dest = (char*) mprMalloc(1);
        }