summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-09-03 10:03:22 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-09-03 16:00:26 +0200
commit2db20f970cb0ada26358482c49f6c1dce5ea4ea2 (patch)
tree233428643b9fa1031ec058c2bc270fd664c5daa9 /src/tests
parent07f8737113dfa6d5f8afe76bf7d3170e2c766e35 (diff)
downloadsssd-2db20f970cb0ada26358482c49f6c1dce5ea4ea2.tar.gz
sssd-2db20f970cb0ada26358482c49f6c1dce5ea4ea2.tar.xz
sssd-2db20f970cb0ada26358482c49f6c1dce5ea4ea2.zip
UTIL: Use standard maximum value of type size_t
It is better to use standard constant for maximum value of type size_t, instead of reinventing wheel with own defined constant SIZE_T_MAX This patch replace string "SIZE_T_MAX" -> "SIZE_MAX"
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/util-tests.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tests/util-tests.c b/src/tests/util-tests.c
index 3628b0a6b..69fdf156e 100644
--- a/src/tests/util-tests.c
+++ b/src/tests/util-tests.c
@@ -388,14 +388,14 @@ END_TEST
START_TEST(test_size_t_overflow)
{
fail_unless(!SIZE_T_OVERFLOW(1, 1), "unexpected overflow");
- fail_unless(!SIZE_T_OVERFLOW(SIZE_T_MAX, 0), "unexpected overflow");
- fail_unless(!SIZE_T_OVERFLOW(SIZE_T_MAX-10, 10), "unexpected overflow");
- fail_unless(SIZE_T_OVERFLOW(SIZE_T_MAX, 1), "overflow not detected");
- fail_unless(SIZE_T_OVERFLOW(SIZE_T_MAX, SIZE_T_MAX),
+ fail_unless(!SIZE_T_OVERFLOW(SIZE_MAX, 0), "unexpected overflow");
+ fail_unless(!SIZE_T_OVERFLOW(SIZE_MAX-10, 10), "unexpected overflow");
+ fail_unless(SIZE_T_OVERFLOW(SIZE_MAX, 1), "overflow not detected");
+ fail_unless(SIZE_T_OVERFLOW(SIZE_MAX, SIZE_MAX),
"overflow not detected");
- fail_unless(SIZE_T_OVERFLOW(SIZE_T_MAX, ULLONG_MAX),
+ fail_unless(SIZE_T_OVERFLOW(SIZE_MAX, ULLONG_MAX),
"overflow not detected");
- fail_unless(SIZE_T_OVERFLOW(SIZE_T_MAX, -10), "overflow not detected");
+ fail_unless(SIZE_T_OVERFLOW(SIZE_MAX, -10), "overflow not detected");
}
END_TEST