mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
7666cd8881
This patch replaces tt_assert() comparison of integers and unsigned integers with their respective tt_int_op or tt_uint_op counterpart.
50 lines
632 B
Plaintext
50 lines
632 B
Plaintext
@@
|
|
int e;
|
|
constant c;
|
|
@@
|
|
|
|
(
|
|
- tt_assert(e == c)
|
|
+ tt_int_op(e, OP_EQ, c)
|
|
|
|
|
- tt_assert(e != c)
|
|
+ tt_int_op(e, OP_NE, c)
|
|
|
|
|
- tt_assert(e < c)
|
|
+ tt_int_op(e, OP_LT, c)
|
|
|
|
|
- tt_assert(e <= c)
|
|
+ tt_int_op(e, OP_LE, c)
|
|
|
|
|
- tt_assert(e > c)
|
|
+ tt_int_op(e, OP_GT, c)
|
|
|
|
|
- tt_assert(e >= c)
|
|
+ tt_int_op(e, OP_GE, c)
|
|
)
|
|
|
|
@@
|
|
unsigned int e;
|
|
constant c;
|
|
@@
|
|
|
|
(
|
|
- tt_assert(e == c)
|
|
+ tt_uint_op(e, OP_EQ, c)
|
|
|
|
|
- tt_assert(e != c)
|
|
+ tt_uint_op(e, OP_NE, c)
|
|
|
|
|
- tt_assert(e < c)
|
|
+ tt_uint_op(e, OP_LT, c)
|
|
|
|
|
- tt_assert(e <= c)
|
|
+ tt_uint_op(e, OP_LE, c)
|
|
|
|
|
- tt_assert(e > c)
|
|
+ tt_uint_op(e, OP_GT, c)
|
|
|
|
|
- tt_assert(e >= c)
|
|
+ tt_uint_op(e, OP_GE, c)
|
|
)
|