File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 39
39
40
40
/* zend_long vs. (unsigned) int checks. */
41
41
#ifdef ZEND_LONG_CAN_OVFL_INT
42
- # define ZEND_LONG_INT_OVFL (zlong ) ((zlong) > (zend_long)INT_MAX)
43
- # define ZEND_LONG_INT_UDFL (zlong ) ((zlong) < (zend_long)INT_MIN)
44
- # define ZEND_LONG_EXCEEDS_INT (zlong ) (ZEND_LONG_INT_OVFL(zlong) || ZEND_LONG_INT_UDFL(zlong))
45
- # define ZEND_LONG_UINT_OVFL (zlong ) ((zlong) < 0 || (zlong) > (zend_long)UINT_MAX)
42
+ # define ZEND_LONG_INT_OVFL (zlong ) UNEXPECTED ((zlong) > (zend_long)INT_MAX)
43
+ # define ZEND_LONG_INT_UDFL (zlong ) UNEXPECTED ((zlong) < (zend_long)INT_MIN)
44
+ # define ZEND_LONG_EXCEEDS_INT (zlong ) UNEXPECTED (ZEND_LONG_INT_OVFL(zlong) || ZEND_LONG_INT_UDFL(zlong))
45
+ # define ZEND_LONG_UINT_OVFL (zlong ) UNEXPECTED ((zlong) < 0 || (zlong) > (zend_long)UINT_MAX)
46
46
#else
47
47
# define ZEND_LONG_INT_OVFL (zl ) (0)
48
48
# define ZEND_LONG_INT_UDFL (zl ) (0)
51
51
#endif
52
52
53
53
/* size_t vs (unsigned) int checks. */
54
- #define ZEND_SIZE_T_INT_OVFL (size ) ((size) > (size_t)INT_MAX)
54
+ #define ZEND_SIZE_T_INT_OVFL (size ) UNEXPECTED ((size) > (size_t)INT_MAX)
55
55
#ifdef ZEND_SIZE_T_CAN_OVFL_UINT
56
- # define ZEND_SIZE_T_UINT_OVFL (size ) ((size) > (size_t)UINT_MAX)
56
+ # define ZEND_SIZE_T_UINT_OVFL (size ) UNEXPECTED ((size) > (size_t)UINT_MAX)
57
57
#else
58
58
# define ZEND_SIZE_T_UINT_OVFL (size ) (0)
59
59
#endif
You can’t perform that action at this time.
0 commit comments