Lines Matching refs:max
32 # define OSSL_SAFE_MATH_ADDS(type_name, type, min, max) \ argument
42 return a < 0 ? min : max; \
45 # define OSSL_SAFE_MATH_ADDU(type_name, type, max) \ argument
59 # define OSSL_SAFE_MATH_ADDS(type_name, type, min, max) \ argument
65 || (a > 0 && b <= max - a) \
70 return a < 0 ? min : max; \
73 # define OSSL_SAFE_MATH_ADDU(type_name, type, max) \ argument
78 if (b > max - a) \
88 # define OSSL_SAFE_MATH_SUBS(type_name, type, min, max) \ argument
98 return a < 0 ? min : max; \
102 # define OSSL_SAFE_MATH_SUBS(type_name, type, min, max) \ argument
109 || (b < 0 && a <= max + b) \
113 return a < 0 ? min : max; \
132 # define OSSL_SAFE_MATH_MULS(type_name, type, min, max) \ argument
142 return (a < 0) ^ (b < 0) ? min : max; \
145 # define OSSL_SAFE_MATH_MULU(type_name, type, max) \ argument
159 # define OSSL_SAFE_MATH_MULS(type_name, type, min, max) \ argument
174 if (x <= max / y) \
178 return (a < 0) ^ (b < 0) ? min : max; \
181 # define OSSL_SAFE_MATH_MULU(type_name, type, max) \ argument
186 if (b != 0 && a > max / b) \
195 # define OSSL_SAFE_MATH_DIVS(type_name, type, min, max) \ argument
202 return a < 0 ? min : max; \
206 return max; \
211 # define OSSL_SAFE_MATH_DIVU(type_name, type, max) \ argument
219 return max; \
225 # define OSSL_SAFE_MATH_MODS(type_name, type, min, max) \ argument
236 return max; \
317 # define OSSL_SAFE_MATH_MULDIVS(type_name, type, max) \ argument
328 return a == 0 || b == 0 ? 0 : max; \
346 # define OSSL_SAFE_MATH_MULDIVU(type_name, type, max) \ argument
357 return a == 0 || b == 0 ? 0 : max; \
378 #define OSSL_SAFE_MATH_DIV_ROUND_UP(type_name, type, max) \ argument
390 if (a < max - b) \
396 return a == 0 ? 0 : max; \