Skip to content

Commit ad1b29c

Browse files
philljjdanielinux
authored andcommitted
esp: tiny unit_esp review cleanup.
1 parent d8b712f commit ad1b29c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/test/unit/unit_esp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ START_TEST(test_replay_overflow)
671671
END_TEST
672672

673673
/* The sequence number must only be committed after aead verify.
674-
* Send plausible junk ESP packets for a real RFC4543 SA, and check the
674+
* Send a plausible junk ESP packet for a real RFC4543 SA, and check the
675675
* inbound replay state is not mutated after verify failure. */
676676
START_TEST(test_replay_aead_verify)
677677
{
@@ -682,7 +682,7 @@ START_TEST(test_replay_aead_verify)
682682
wolfIP_esp_sa * esp_sa = NULL;
683683
struct wolfIP_ip_packet *ip = (struct wolfIP_ip_packet *)buf;
684684

685-
for (i = 0U; i < sizeof(ref); i++) ref[i] = (uint8_t)(i & 0xaaU);
685+
for (i = 0U; i < sizeof(ref); i++) ref[i] = (uint8_t)(i & 0xffU);
686686

687687
/* fake ESP packet with enough data to get through early processing, but
688688
* eventually fail during GMAC verify. */
@@ -705,7 +705,7 @@ START_TEST(test_replay_aead_verify)
705705
ck_assert_uint_eq(esp_sa->replay.bitmap, 0U);
706706

707707
/* should fail to unwrap. */
708-
frame_len = build_ip_packet(buf, sizeof(buf), 0x32, ref, sizeof(ref));
708+
frame_len = build_ip_packet(buf, sizeof(buf), 0x32U, ref, sizeof(ref));
709709
ret = esp_transport_unwrap(ip, &frame_len);
710710
ck_assert_int_eq(ret, -1);
711711

0 commit comments

Comments
 (0)