summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/utest/testcases/posix/stdlib_h/functions/atoi_tc.c2
-rw-r--r--examples/utest/testcases/posix/stdlib_h/functions/atol_tc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/utest/testcases/posix/stdlib_h/functions/atoi_tc.c b/examples/utest/testcases/posix/stdlib_h/functions/atoi_tc.c
index ede3525d78..540d297cb0 100644
--- a/examples/utest/testcases/posix/stdlib_h/functions/atoi_tc.c
+++ b/examples/utest/testcases/posix/stdlib_h/functions/atoi_tc.c
@@ -47,7 +47,7 @@ int atoi_entry(void)
{
int i = 0;
int res = 0;
- for (i = 0; i < sizeof(test_data[0]); i++)
+ for (i = 0; i < sizeof(test_data) / sizeof(test_data[0]); i++)
{
res = atoi(test_data[i].string);
uassert_int_equal(res, test_data[i].ret_num);
diff --git a/examples/utest/testcases/posix/stdlib_h/functions/atol_tc.c b/examples/utest/testcases/posix/stdlib_h/functions/atol_tc.c
index a2a954d3a8..18567920b8 100644
--- a/examples/utest/testcases/posix/stdlib_h/functions/atol_tc.c
+++ b/examples/utest/testcases/posix/stdlib_h/functions/atol_tc.c
@@ -49,7 +49,7 @@ int atol_entry(void)
{
int i = 0;
int res = 0;
- for (i = 0; i < sizeof(test_data1[0]); i++)
+ for (i = 0; i < sizeof(test_data1) / sizeof(test_data1[0]); i++)
{
res = atol(test_data1[i].string);
uassert_int_equal(res, test_data1[i].ret_num);