Skip to content

Commit e92f41a

Browse files
committed
Fix print error
1 parent 79e5111 commit e92f41a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

TESTS/mbed_hal/trng/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ static void compress_and_compare(char *key, char *value)
111111

112112
out_comp_buf = new uint8_t[OUT_COMP_BUF_SIZE];
113113
buffer = new uint8_t[BUFFER_LEN];
114-
input_buf = new uint8_t[BUFFER_LEN * 4];
115114
temp_buf = new uint8_t[BUFFER_LEN * 2];
115+
input_buf = new uint8_t[BUFFER_LEN * 4];
116116

117117
/*At the begining of step 2 load trng buffer from step 1*/
118118
if (strcmp(key, MSG_TRNG_TEST_STEP2) == 0) {
@@ -149,7 +149,7 @@ static void compress_and_compare(char *key, char *value)
149149
TEST_ASSERT_MESSAGE(comp_sz > BUFFER_LEN,
150150
"TRNG_TEST_STEP1: trng_get_bytes was able to compress thus not random");
151151

152-
/*pithy_Compress will try to compress the random data with a different buffer sizem*/
152+
/*pithy_Compress will try to compress the random data with a different buffer size*/
153153
result = fill_buffer_trng(temp_buf, &trng_obj, TEMP_BUF_SIZE);
154154
TEST_ASSERT_EQUAL(0, result);
155155

@@ -158,7 +158,7 @@ static void compress_and_compare(char *key, char *value)
158158
(char *)out_comp_buf,
159159
OUT_COMP_BUF_SIZE,
160160
9);
161-
if (comp_sz <= BUFFER_LEN){
161+
if (comp_sz <= TEMP_BUF_SIZE){
162162
print_array(temp_buf, TEMP_BUF_SIZE);
163163
}
164164
TEST_ASSERT_MESSAGE(comp_sz > TEMP_BUF_SIZE,

0 commit comments

Comments
 (0)