mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* math.c (domain_check): ANSI style function arguments
* math.c (math_log): too few argument to domain_check(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									793a952bc6
								
							
						
					
					
						commit
						f0dff3c677
					
				
					 2 changed files with 8 additions and 4 deletions
				
			
		
							
								
								
									
										6
									
								
								math.c
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								math.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -23,9 +23,7 @@ VALUE rb_mMath;
 | 
			
		|||
} while (0)
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
domain_check(x, msg)
 | 
			
		||||
    double x;
 | 
			
		||||
    char *msg;
 | 
			
		||||
domain_check(double x, char *msg)
 | 
			
		||||
{
 | 
			
		||||
    while(1) {
 | 
			
		||||
	if (errno) {
 | 
			
		||||
| 
						 | 
				
			
			@ -325,7 +323,7 @@ math_log(int argc, VALUE *argv)
 | 
			
		|||
	Need_Float(base);
 | 
			
		||||
	d /= log(RFLOAT(base)->value);
 | 
			
		||||
    }
 | 
			
		||||
    domain_check(d);
 | 
			
		||||
    domain_check(d, "log");
 | 
			
		||||
    return rb_float_new(d);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue