* fenv.cc (fesetround): Fix test for valid input parameter.
(fesetprec): Ditto.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | |||||||
|  | 2012-05-02  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
|  | 	* fenv.cc (fesetround): Fix test for valid input parameter. | ||||||
|  | 	(fesetprec): Ditto. | ||||||
|  |  | ||||||
| 2012-04-30  Christopher Faylor  <me.cygwin2012@cgf.cx> | 2012-04-30  Christopher Faylor  <me.cygwin2012@cgf.cx> | ||||||
|  |  | ||||||
| 	* fhandler.h (PIPE_ADD_PID): Define new flag. | 	* fhandler.h (PIPE_ADD_PID): Define new flag. | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| /* fenv.cc | /* fenv.cc | ||||||
|  |  | ||||||
|    Copyright 2010, 2011 Red Hat, Inc. |    Copyright 2010, 2011, 2012 Red Hat, Inc. | ||||||
|  |  | ||||||
| This file is part of Cygwin. | This file is part of Cygwin. | ||||||
|  |  | ||||||
| @@ -349,7 +349,7 @@ fesetround (int round) | |||||||
|   unsigned int mxcsr = 0; |   unsigned int mxcsr = 0; | ||||||
|  |  | ||||||
|   /* Will succeed for any valid value of the input parameter.  */ |   /* Will succeed for any valid value of the input parameter.  */ | ||||||
|   if (round & ~(FE_CW_ROUND_MASK >> FE_CW_PREC_SHIFT)) |   if (round < FE_TONEAREST || round > FE_TOWARDZERO) | ||||||
|     return EINVAL; |     return EINVAL; | ||||||
|  |  | ||||||
|   /* Get control words.  */ |   /* Get control words.  */ | ||||||
| @@ -395,7 +395,7 @@ fesetprec (int prec) | |||||||
|   unsigned short cw; |   unsigned short cw; | ||||||
|  |  | ||||||
|   /* Will succeed for any valid value of the input parameter.  */ |   /* Will succeed for any valid value of the input parameter.  */ | ||||||
|   if (prec & ~(FE_CW_PREC_MASK >> FE_CW_PREC_SHIFT) || prec == FE_RESERVEDPREC) |   if (prec < FE_SINGLEPREC || prec > FE_EXTENDEDPREC) | ||||||
|     return EINVAL; |     return EINVAL; | ||||||
|  |  | ||||||
|   /* Get control word.  */ |   /* Get control word.  */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user