mirror of
				https://github.com/samba-team/samba.git
				synced 2025-11-04 00:23:49 +03:00 
			
		
		
		
	r8631: give an error on incorrect argument count
This commit is contained in:
		
				
					committed by
					
						
						Gerald (Jerry) Carter
					
				
			
			
				
	
			
			
			
						parent
						
							a2266f6927
						
					
				
				
					commit
					ed09e19794
				
			@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user