From 59659857349926b005ef2efb243bd72fdbe4c9f4 Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 24 Feb 2020 23:33:30 +0800 Subject: [PATCH 1/2] Fixed macro error in emac_util.h INVALID_LENGHT -> INVALID_LENGTH --- TESTS/network/emac/emac_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TESTS/network/emac/emac_util.h b/TESTS/network/emac/emac_util.h index 26f5b7339d9..8b6b272268e 100644 --- a/TESTS/network/emac/emac_util.h +++ b/TESTS/network/emac/emac_util.h @@ -36,7 +36,7 @@ extern const unsigned char eth_mac_broadcast_addr[]; // Message validation flags #define BROADCAST 0x01 #define RESPONSE_RECEIVED 0x02 -#define INVALID_LENGHT 0x04 +#define INVALID_LENGTH 0x04 #define INVALID_DATA 0x08 #define PRINTED 0x10 // Validates outgoing messages for replies, sets error flags on error From 7f1443de88e9d2c443448408898f8e380fbc8891 Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 24 Feb 2020 23:43:07 +0800 Subject: [PATCH 2/2] Fixed macro error in emac_util.cpp Fixed macro spelling error: INVALID_LENGHT-> INVALID_LENGHT --- TESTS/network/emac/emac_util.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TESTS/network/emac/emac_util.cpp b/TESTS/network/emac/emac_util.cpp index 11ee559c8d0..8f96f67340b 100644 --- a/TESTS/network/emac/emac_util.cpp +++ b/TESTS/network/emac/emac_util.cpp @@ -203,7 +203,7 @@ void emac_if_validate_outgoing_msg(void) if (outgoing_msgs[i].flags & RESPONSE_RECEIVED) { - int failure = outgoing_msgs[i].flags & (INVALID_LENGHT | INVALID_DATA); + int failure = outgoing_msgs[i].flags & (INVALID_LENGTH | INVALID_DATA); if (failure) { SET_ERROR_FLAGS(MSG_VALID_ERROR); @@ -212,7 +212,7 @@ void emac_if_validate_outgoing_msg(void) if (!(outgoing_msgs[i].flags & PRINTED)) { if ((trace_level & TRACE_SUCCESS) || ((trace_level & TRACE_FAILURE) && failure)) { printf("response: receipt number %i %s %s %s\r\n\r\n", outgoing_msgs[i].receipt_number, - outgoing_msgs[i].flags & INVALID_LENGHT ? "LENGTH INVALID" : "LENGTH OK", + outgoing_msgs[i].flags & INVALID_LENGTH ? "LENGTH INVALID" : "LENGTH OK", outgoing_msgs[i].flags & INVALID_DATA ? "DATA INVALID" : "DATA OK", outgoing_msgs[i].flags & BROADCAST ? "BROADCAST" : "UNICAST"); outgoing_msgs[i].flags |= PRINTED; @@ -252,11 +252,11 @@ bool emac_if_update_reply_to_outgoing_msg(int receipt_number, int length, int in minimum frame length or sent length (in case frame has been converted to be longer than minimum length does not validate length) */ if (length != ETH_FRAME_MIN_LEN && length != ETH_FRAME_PADD_LEN && outgoing_msgs[outgoing_msg_index].length != length && length < ETH_FRAME_MIN_LEN) { - outgoing_msgs[outgoing_msg_index].flags |= INVALID_LENGHT; + outgoing_msgs[outgoing_msg_index].flags |= INVALID_LENGTH; } } else { if (outgoing_msgs[outgoing_msg_index].length != length) { - outgoing_msgs[outgoing_msg_index].flags |= INVALID_LENGHT; + outgoing_msgs[outgoing_msg_index].flags |= INVALID_LENGTH; } } if (invalid_data_index && invalid_data_index < outgoing_msgs[outgoing_msg_index].length) {