From 157664702c410b80f81d47b56a31bb8edcf99463 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 13 Feb 2020 11:29:39 +0700 Subject: [PATCH] clean up --- cores/nRF5/verify.h | 4 ++-- libraries/Bluefruit52Lib/src/utility/bonding.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cores/nRF5/verify.h b/cores/nRF5/verify.h index b9114547..c66cb4b3 100644 --- a/cores/nRF5/verify.h +++ b/cores/nRF5/verify.h @@ -61,13 +61,13 @@ extern "C" static inline void VERIFY_MESS_impl(int32_t _status, const char* (*_fstr)(int32_t), const char* func_name, int line_number) { printf("%s: %d: verify failed, error = ", func_name, line_number); - if (_fstr) + if (_fstr && _fstr(_status)) { printf(_fstr(_status)); } else { - printf("%ld", _status); + printf("0x%lX (%ld)", _status, _status); } printf("\n"); } diff --git a/libraries/Bluefruit52Lib/src/utility/bonding.cpp b/libraries/Bluefruit52Lib/src/utility/bonding.cpp index 9783ac5d..a01b3363 100644 --- a/libraries/Bluefruit52Lib/src/utility/bonding.cpp +++ b/libraries/Bluefruit52Lib/src/utility/bonding.cpp @@ -53,9 +53,9 @@ using namespace Adafruit_LittleFS_Namespace; /*------------------------------------------------------------------*/ /* Bond Key is saved in following layout - * - Bond Data : 80 bytes - * - Name : variable (including null char) - * - CCCD : variable + * - Keyset : 80 bytes (sizeof(bond_keys_t)) + * - Name : variable (including null char) + * - CCCD : variable * * Each field has an 1-byte preceding length *------------------------------------------------------------------*/