Skip to content

Commit

Permalink
formatting: Fix code formatting with clang-format
Browse files Browse the repository at this point in the history
The changed code was reformatted with `git clang-format`.
  • Loading branch information
LukasWoodtli committed Jan 29, 2024
1 parent dc97acc commit dc97069
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
10 changes: 5 additions & 5 deletions coap/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ lwm2m_transaction_t * transaction_new(void * sessionH,
}
}

LOG_ARG("Exiting on success. new transac=%p", (void*)transacP);
LOG_ARG("Exiting on success. new transac=%p", (void *)transacP);
return transacP;

error:
Expand All @@ -255,7 +255,7 @@ lwm2m_transaction_t * transaction_new(void * sessionH,

void transaction_free(lwm2m_transaction_t * transacP)
{
LOG_ARG("Entering. transaction=%p", (void*)transacP);
LOG_ARG("Entering. transaction=%p", (void *)transacP);
if (transacP->message)
{
coap_free_header(transacP->message);
Expand All @@ -279,7 +279,7 @@ void transaction_free(lwm2m_transaction_t * transacP)
void transaction_remove(lwm2m_context_t * contextP,
lwm2m_transaction_t * transacP)
{
LOG_ARG("Entering. transaction=%p", (void*)transacP);
LOG_ARG("Entering. transaction=%p", (void *)transacP);
contextP->transactionList = (lwm2m_transaction_t *) LWM2M_LIST_RM(contextP->transactionList, transacP->mID, NULL);
transaction_free(transacP);
}
Expand Down Expand Up @@ -370,7 +370,7 @@ int transaction_send(lwm2m_context_t * contextP,
{
bool maxRetriesReached = false;

LOG_ARG("Entering: transaction=%p", (void*)transacP);
LOG_ARG("Entering: transaction=%p", (void *)transacP);
if (transacP->buffer == NULL)
{
transacP->buffer_len = coap_serialize_get_size(transacP->message);
Expand Down Expand Up @@ -444,7 +444,7 @@ int transaction_send(lwm2m_context_t * contextP,
error:
if (transacP->callback)
{
LOG_ARG("transaction %p expired..calling callback",(void*)transacP);
LOG_ARG("transaction %p expired..calling callback", (void *)transacP);
transacP->callback(contextP, transacP, NULL);
}
transaction_remove(contextP, transacP);
Expand Down
8 changes: 2 additions & 6 deletions core/management.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,8 @@ uint8_t dm_handleRequest(lwm2m_context_t * contextP,
else
{
length = (size_t)res;
LOG_ARG("Observe Request[/%d/%d/%d]: %.*s\n",
uriP->objectId,
uriP->instanceId,
uriP->resourceId,
(int)length,
STR_NULL2EMPTY(buffer));
LOG_ARG("Observe Request[/%d/%d/%d]: %.*s\n", uriP->objectId, uriP->instanceId,
uriP->resourceId, (int)length, STR_NULL2EMPTY(buffer));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion data/tlv.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ int lwm2m_decode_TLV(const uint8_t * buffer,
{

LOG_ARG("buffer_len: %zd", buffer_len);
;
;
if (buffer_len < 2) return 0;

*oDataIndex = 2;
Expand Down
2 changes: 1 addition & 1 deletion tests/logging_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static void test_log_level(void) {
LOG_FATAL("fatal %s", "with arg");
LOG_ARG_FATAL("%s", LOG_URI_TO_STRING(get_test_uri()));

const char * const log_buffer = test_log_handler_get_captured_message();
const char *const log_buffer = test_log_handler_get_captured_message();
#if LWM2M_LOG_LEVEL == LWM2M_DBG
const char *const expected_log = "DBG - [test_log_level] debug\n"
"DBG - [test_log_level] debug with arg\n"
Expand Down

0 comments on commit dc97069

Please sign in to comment.