1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

r8631: give an error on incorrect argument count

(This used to be commit ed09e19794d9625553bc48892a2e08b84d7bdcf4)
This commit is contained in:
Andrew Tridgell 2005-07-20 05:40:24 +00:00 committed by Gerald (Jerry) Carter
parent 6f48b3a5cb
commit 3473f6b74b
2 changed files with 4 additions and 5 deletions

View File

@ -2059,12 +2059,11 @@ static int evalFunction(Ejs *ep, MprVar *obj, int flags)
formalArgs = prototype->function.args;
argNames = (char**) formalArgs->handles;
#if FUTURE
if (formalArgs->used != actualArgs->used) {
ejsError(ep, "Bad number of args. Should be %d", formalArgs->used);
if (formalArgs->used > actualArgs->used) {
ejsError(ep, "Bad number of args. Should be %d",
formalArgs->used);
return -1;
}
#endif
/*
* Create the arguments and callee variables

View File

@ -103,7 +103,7 @@ typedef struct Esp {
int lifetime, const char *path, bool secure);
void (*setHeader)(EspHandle handle, const char *value, bool allowMultiple);
void (*setResponseCode)(EspHandle handle, int code);
int (*writeBlock)(EspHandle handle, char *buf, int size);
int (*writeBlock)(EspHandle handle, const char *buf, int size);
int (*writeFmt)(EspHandle handle, char *fmt, ...);
#if BLD_FEATURE_MULTITHREAD
void (*lock)(void *lockData);