aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_send.c
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-02 17:14:56 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-01-02 17:14:56 -0500
commit3b25a0491ce9ef9b55c903c6c7f0929bc2910d1a (patch)
tree95b61b97468093c079a19a9ad8b8f2100cf6e983 /tests/test_send.c
parente3637d97ecaef1768d3f9ef40cb0204a0e668ff2 (diff)
Allocate ISO-TP message buffer on the stack.
Diffstat (limited to 'tests/test_send.c')
-rw-r--r--tests/test_send.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_send.c b/tests/test_send.c
index 0320576c..ca1842a6 100644
--- a/tests/test_send.c
+++ b/tests/test_send.c
@@ -17,12 +17,12 @@ extern bool can_frame_was_sent;
extern bool message_was_received;
extern uint16_t last_message_received_arb_id;
-extern uint8_t* last_message_received_payload;
+extern uint8_t last_message_received_payload[];
extern uint8_t last_message_received_payload_size;
extern uint16_t last_message_sent_arb_id;
extern bool last_message_sent_status;
-extern uint8_t* last_message_sent_payload;
+extern uint8_t last_message_sent_payload[];
extern uint8_t last_message_sent_payload_size;
extern void setup();
@@ -49,8 +49,8 @@ START_TEST (test_send_single_frame)
{
const uint8_t payload[] = {0x12, 0x34};
uint16_t arbitration_id = 0x2a;
- IsoTpHandle handle = isotp_send(&SHIMS, arbitration_id, payload, sizeof(payload),
- message_sent);
+ IsoTpHandle handle = isotp_send(&SHIMS, arbitration_id, payload,
+ sizeof(payload), message_sent);
ck_assert_int_eq(last_message_sent_arb_id, arbitration_id);
fail_unless(last_message_sent_status);
ck_assert_int_eq(last_message_sent_payload[0], 0x12);