diff options
Diffstat (limited to 'source4/lib/appweb/ejs-2.0')
-rw-r--r-- | source4/lib/appweb/ejs-2.0/ejs/ejsCmd.c | 10 | ||||
-rw-r--r-- | source4/lib/appweb/ejs-2.0/ejs/ejsVar.c | 4 | ||||
-rw-r--r-- | source4/lib/appweb/ejs-2.0/mpr/mprString.c | 18 |
3 files changed, 19 insertions, 13 deletions
diff --git a/source4/lib/appweb/ejs-2.0/ejs/ejsCmd.c b/source4/lib/appweb/ejs-2.0/ejs/ejsCmd.c index b5279c949a..74b57de4d0 100644 --- a/source4/lib/appweb/ejs-2.0/ejs/ejsCmd.c +++ b/source4/lib/appweb/ejs-2.0/ejs/ejsCmd.c @@ -167,10 +167,10 @@ int main(int argc, char *argv[]) i = 0; commandLine = 0; len = mprAllocStrcat(MPR_LOC_ARGS(app), &commandLine, 0, " ", - mprGetBaseName(argv[i++]), 0); + mprGetBaseName(argv[i++]), NULL); for (; i < argc; i++) { len = mprReallocStrcat(MPR_LOC_ARGS(app), &commandLine, 0, len, - " ", argv[i], 0); + " ", argv[i], NULL); } mprPrintf(app, " %s\n", commandLine); } @@ -339,7 +339,7 @@ static char *readCmd(MprApp *app, FILE *input) line[len - 1] = '\0'; } cmdLen = mprReallocStrcat(MPR_LOC_ARGS(app), &cmd, EJS_MAX_SCRIPT, - cmdLen, 0, line, 0); + cmdLen, 0, line, NULL); } return cmd; } @@ -380,12 +380,12 @@ static int interactiveUse(MprApp *app, Ejs *ejs, FILE *input, char *fileName) if (line[len - 1] == '\\') { line[len - 1] = '\0'; cmdLen = mprReallocStrcat(MPR_LOC_ARGS(app), &cmd, EJS_MAX_SCRIPT, - cmdLen, 0, line, 0); + cmdLen, 0, line, NULL); } else { cmdLen = mprReallocStrcat(MPR_LOC_ARGS(app), &cmd, EJS_MAX_SCRIPT, - cmdLen, 0, line, 0); + cmdLen, 0, line, NULL); if (traceCmds) { diff --git a/source4/lib/appweb/ejs-2.0/ejs/ejsVar.c b/source4/lib/appweb/ejs-2.0/ejs/ejsVar.c index 5067215f03..1f8e9266a3 100644 --- a/source4/lib/appweb/ejs-2.0/ejs/ejsVar.c +++ b/source4/lib/appweb/ejs-2.0/ejs/ejsVar.c @@ -2590,7 +2590,7 @@ EjsProperty *ejsDefineAccessors(Ejs *ep, EjsVar *vp, const char *prop, /* MOB -- need to encapsulate this logic */ if (mprAllocStrcat(MPR_LOC_ARGS(ep), &propName, EJS_MAX_ID+5, 0, - "-set-", prop, 0) < 0) { + "-set-", prop, NULL) < 0) { ejsMemoryError(ep); return 0; } @@ -2633,7 +2633,7 @@ EjsProperty *ejsDefineCAccessors(Ejs *ep, EjsVar *vp, const char *prop, /* MOB -- OPT to use SLAB */ if (mprAllocStrcat(MPR_LOC_ARGS(ep), &propName, EJS_MAX_ID + 5, 0, - "-set-", prop, 0) < 0) { + "-set-", prop, NULL) < 0) { ejsMemoryError(ep); return 0; } diff --git a/source4/lib/appweb/ejs-2.0/mpr/mprString.c b/source4/lib/appweb/ejs-2.0/mpr/mprString.c index b688667bcc..d39fc8b746 100644 --- a/source4/lib/appweb/ejs-2.0/mpr/mprString.c +++ b/source4/lib/appweb/ejs-2.0/mpr/mprString.c @@ -232,8 +232,10 @@ static int mprCoreStrcat(MPR_LOC_DEC(ctx, loc), char **destp, int destMax, return required - 1; } -/******************************************************************************/ - +/***************************************************************************** + Note that this VARARGS function must be NULL (not 0, this must be a + pointer) terminated +*/ int mprStrcat(char *dest, int destMax, const char *delim, const char *src, ...) { va_list ap; @@ -249,8 +251,10 @@ int mprStrcat(char *dest, int destMax, const char *delim, const char *src, ...) return rc; } -/******************************************************************************/ - +/***************************************************************************** + Note that this VARARGS function must be NULL (not 0, this must be a + pointer) terminated +*/ int mprAllocStrcat(MPR_LOC_DEC(ctx, loc), char **destp, int destMax, const char *delim, const char *src, ...) { @@ -268,8 +272,10 @@ int mprAllocStrcat(MPR_LOC_DEC(ctx, loc), char **destp, int destMax, return rc; } -/******************************************************************************/ - +/***************************************************************************** + Note that this VARARGS function must be NULL (not 0, this must be a + pointer) terminated +*/ int mprReallocStrcat(MPR_LOC_DEC(ctx, loc), char **destp, int destMax, int existingLen, const char *delim, const char *src,...) { |