From 27b3c8788f8b7200eab76a13cac4d0fc46a30d92 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Thu, 12 May 2016 13:53:20 -0400 Subject: [PATCH] Use fewer headers and change i to uint16_t --- src/canard.c | 3 ++- src/canard.h | 5 ----- src/canard_internals.h | 2 +- src/canard_test.c | 2 -- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/canard.c b/src/canard.c index 856ad457..eeb31be6 100644 --- a/src/canard.c +++ b/src/canard.c @@ -10,6 +10,7 @@ #include "canard.h" #include "canard_internals.h" #include +#include #define CANARD_MAKE_TRANSFER_DESCRIPTOR(data_type_id, transfer_type, \ @@ -299,7 +300,7 @@ void canardHandleRxFrame(CanardInstance* ins, const CanardCANFrame* frame, uint6 uint16_t middle_len = 0; if (rxstate->payload_len < CANARD_RX_PAYLOAD_HEAD_SIZE) { - int i; + uint16_t i; for (i=rxstate->payload_len, tail_offset=0; idata_len-1; i++, tail_offset++) { rxstate->buffer_head[i] = frame->data[tail_offset]; diff --git a/src/canard.h b/src/canard.h index f119329c..6c758a99 100644 --- a/src/canard.h +++ b/src/canard.h @@ -15,13 +15,8 @@ extern "C" { #endif -#include -#include #include -#include #include -#include -#include #include /** The size of a memory block in bytes. */ diff --git a/src/canard_internals.h b/src/canard_internals.h index 04831bd6..3e731c7b 100644 --- a/src/canard_internals.h +++ b/src/canard_internals.h @@ -25,7 +25,7 @@ #ifndef CANARD_INTERNALS_H #define CANARD_INTERNALS_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/canard_test.c b/src/canard_test.c index f1bd07ee..c3796c50 100644 --- a/src/canard_test.c +++ b/src/canard_test.c @@ -12,9 +12,7 @@ #include #include #include -#include #include -#include #include "canard.h" // #include "canard_debug.h" /*