From 9428fff1b363a4a64b7be58048e3c6bc36fe93a8 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Thu, 20 Apr 2017 22:58:58 -0700 Subject: [PATCH] Add `src/core` header files to PRETTY_FILES. (#1632) --- examples/platforms/da15000/Makefile.am | 1 + src/core/Makefile.am | 8 ++++++-- src/core/meshcop/meshcop.hpp | 2 +- src/core/thread/mle_tlvs.hpp | 14 +++++++------- src/core/thread/network_diagnostic_tlvs.hpp | 6 ++++-- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/examples/platforms/da15000/Makefile.am b/examples/platforms/da15000/Makefile.am index 4b13e1477..670c13160 100755 --- a/examples/platforms/da15000/Makefile.am +++ b/examples/platforms/da15000/Makefile.am @@ -105,6 +105,7 @@ noinst_HEADERS PRETTY_FILES = \ $(PLATFORM_SOURCES) \ + $(noinst_HEADERS) \ $(NULL) Dash = - diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 227fe5f6f..9a1061299 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -228,7 +228,7 @@ libopenthread_ftd_a_SOURCES = \ $(SOURCES_MISSING) \ $(NULL) -noinst_HEADERS = \ +HEADERS_COMMON = \ openthread-core-config.h \ openthread-core-default-config.h \ openthread-instance.h \ @@ -336,9 +336,13 @@ noinst_HEADERS = \ utils/jam_detector.hpp \ $(NULL) +noinst_HEADERS = \ + $(HEADERS_COMMON) \ + $(NULL) + PRETTY_FILES = \ $(SOURCES_COMMON) \ - $(SOURCES_FTD) \ + $(HEADERS_COMMON) \ $(NULL) if OPENTHREAD_BUILD_COVERAGE diff --git a/src/core/meshcop/meshcop.hpp b/src/core/meshcop/meshcop.hpp index 4023f1b64..bebec274e 100644 --- a/src/core/meshcop/meshcop.hpp +++ b/src/core/meshcop/meshcop.hpp @@ -50,7 +50,7 @@ enum * This function create Message for MeshCoP * */ -inline Message* NewMeshCoPMessage(Coap::CoapBase &aCoapBase, const Coap::Header &aHeader) +inline Message *NewMeshCoPMessage(Coap::CoapBase &aCoapBase, const Coap::Header &aHeader) { return aCoapBase.NewMessage(aHeader, kMeshCoPMessagePriority); } diff --git a/src/core/thread/mle_tlvs.hpp b/src/core/thread/mle_tlvs.hpp index d737dc925..64976f883 100644 --- a/src/core/thread/mle_tlvs.hpp +++ b/src/core/thread/mle_tlvs.hpp @@ -882,18 +882,16 @@ public: * @retval kThreadError_NotFound No subsequent Tlv exists in TlvRequestTlv. * */ - ThreadError GetNextTlv(TlvRequestIterator &aIterator, uint8_t &aTlv) - { + ThreadError GetNextTlv(TlvRequestIterator &aIterator, uint8_t &aTlv) { ThreadError error = kThreadError_NotFound; - if (aIterator < GetLength()) - { + if (aIterator < GetLength()) { aTlv = mTlvs[aIterator]; aIterator = static_cast(aIterator + sizeof(uint8_t)); error = kThreadError_None; } - return error; + return error; } /** @@ -1014,8 +1012,10 @@ public: * @retval FALSE If the TLV does not appear to be well-formed. * */ - bool IsValid(void) const { return (GetLength() == sizeof(*this) - sizeof(Tlv) || - GetLength() == sizeof(*this) - sizeof(Tlv) - sizeof(mSedBufferSize) - sizeof(mSedDatagramCount)); } + bool IsValid(void) const { + return (GetLength() == sizeof(*this) - sizeof(Tlv) || + GetLength() == sizeof(*this) - sizeof(Tlv) - sizeof(mSedBufferSize) - sizeof(mSedDatagramCount)); + } /** * This method returns the Parent Priority value. diff --git a/src/core/thread/network_diagnostic_tlvs.hpp b/src/core/thread/network_diagnostic_tlvs.hpp index 54631d3cf..7b438b0e7 100644 --- a/src/core/thread/network_diagnostic_tlvs.hpp +++ b/src/core/thread/network_diagnostic_tlvs.hpp @@ -349,8 +349,10 @@ public: * @retval FALSE If the TLV does not appear to be well-formed. * */ - bool IsValid(void) const { return (GetLength() == sizeof(*this) - sizeof(NetworkDiagnosticTlv) || - GetLength() == sizeof(*this) - sizeof(NetworkDiagnosticTlv) - sizeof(mSedBufferSize) - sizeof(mSedDatagramCount)); } + bool IsValid(void) const { + return (GetLength() == sizeof(*this) - sizeof(NetworkDiagnosticTlv) || + GetLength() == sizeof(*this) - sizeof(NetworkDiagnosticTlv) - sizeof(mSedBufferSize) - sizeof(mSedDatagramCount)); + } /** * This method returns the Parent Priority value.