diff options
Diffstat (limited to 'source4/scripting/ejs/smbcalls_string.c')
-rw-r--r-- | source4/scripting/ejs/smbcalls_string.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/scripting/ejs/smbcalls_string.c b/source4/scripting/ejs/smbcalls_string.c index b83178dbba..541303ff2d 100644 --- a/source4/scripting/ejs/smbcalls_string.c +++ b/source4/scripting/ejs/smbcalls_string.c @@ -238,7 +238,7 @@ static int ejs_join(MprVarHandle eid, int argc, struct MprVar **argv) goto failed; } for (i=1;list[i];i++) { - ret = talloc_asprintf_append(ret, "%s%s", separator, list[i]); + ret = talloc_asprintf_append_buffer(ret, "%s%s", separator, list[i]); if (ret == NULL) { goto failed; } @@ -275,7 +275,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv) ret = talloc_strdup(tmp_ctx, ""); /* avoid all the format string warnings */ - _asprintf_append = (_asprintf_append_t)talloc_asprintf_append; + _asprintf_append = (_asprintf_append_t)talloc_asprintf_append_buffer; /* hackity hack ... @@ -284,7 +284,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv) char *fmt2; int len, len_count=0; char *tstr; - ret = talloc_asprintf_append(ret, "%*.*s", + ret = talloc_asprintf_append_buffer(ret, "%*.*s", (int)(p-format), (int)(p-format), format); if (ret == NULL) goto failed; @@ -299,7 +299,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv) tstr--; } if (strcmp(tstr, "%") == 0) { - ret = talloc_asprintf_append(ret, "%%"); + ret = talloc_asprintf_append_buffer(ret, "%%"); if (ret == NULL) { goto failed; } @@ -372,7 +372,7 @@ static int ejs_sprintf(MprVarHandle eid, int argc, struct MprVar **argv) format += len+1; } - ret = talloc_asprintf_append(ret, "%s", format); + ret = talloc_asprintf_append_buffer(ret, "%s", format); mpr_Return(eid, mprString(ret)); talloc_free(tmp_ctx); return 0; @@ -437,7 +437,7 @@ static int ejs_encodeURIComponent(MprVarHandle eid, int argc, char **argv) if (!isalnum(s[i])) count++; } - ret = talloc_size(mprMemCtx(), i + count*2 + 1); + ret = talloc_array(mprMemCtx(), char, i + count*2 + 1); if (ret == NULL) { return -1; } @@ -470,7 +470,7 @@ static int ejs_decodeURIComponent(MprVarHandle eid, int argc, char **argv) s = argv[0]; - ret = talloc_size(mprMemCtx(), strlen(s) + 1); + ret = talloc_array(mprMemCtx(), char, strlen(s) + 1); if (ret == NULL) { return -1; } |