Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast variable type based on format identifier #28

Merged
merged 2 commits into from
Nov 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions source/defender.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,11 @@ DefenderStatus_t Defender_GetTopic( char * pBuffer,
ret = DefenderBadParameter;

LogError( ( "Invalid input parameter. pBuffer: %p, bufferLength: %u, "
"pThingName: %p, thingNameLength: %u, api: %d, pOutLength: %p.\r\n",
"pThingName: %p, thingNameLength: %u, api: %d, pOutLength: %p.",
( void * ) pBuffer,
bufferLength,
( unsigned int ) bufferLength,
( void * ) pThingName,
thingNameLength,
( unsigned int ) thingNameLength,
api,
( void * ) pOutLength ) );
}
Expand All @@ -420,9 +420,9 @@ DefenderStatus_t Defender_GetTopic( char * pBuffer,
ret = DefenderBufferTooSmall;

LogError( ( "The buffer is too small to hold the topic string. "
"Provided buffer size: %u, Required buffer size: %u.\r\n",
bufferLength,
topicLength ) );
"Provided buffer size: %u, Required buffer size: %u.",
( unsigned int ) bufferLength,
( unsigned int ) topicLength ) );
}
}

Expand Down Expand Up @@ -471,7 +471,7 @@ DefenderStatus_t Defender_MatchTopic( const char * pTopic,
if( ( pTopic == NULL ) || ( pOutApi == NULL ) )
{
ret = DefenderBadParameter;
LogError( ( "Invalid input parameter. pTopic: %p, pOutApi: %p.\r\n",
LogError( ( "Invalid input parameter. pTopic: %p, pOutApi: %p.",
( void * ) pTopic,
( void * ) pOutApi ) );
}
Expand All @@ -492,7 +492,7 @@ DefenderStatus_t Defender_MatchTopic( const char * pTopic,
}
else
{
LogDebug( ( "The topic does not contain defender prefix $aws/things/.\r\n" ) );
LogDebug( ( "The topic does not contain defender prefix $aws/things/." ) );
}
}

Expand All @@ -509,7 +509,7 @@ DefenderStatus_t Defender_MatchTopic( const char * pTopic,
}
else
{
LogDebug( ( "The topic does not contain a valid thing name.\r\n" ) );
LogDebug( ( "The topic does not contain a valid thing name." ) );
}
}

Expand All @@ -525,7 +525,7 @@ DefenderStatus_t Defender_MatchTopic( const char * pTopic,
}
else
{
LogDebug( ( "The topic does not contain the defender bridge /defender/metrics/.\r\n" ) );
LogDebug( ( "The topic does not contain the defender bridge /defender/metrics/." ) );
}
}

Expand All @@ -538,7 +538,7 @@ DefenderStatus_t Defender_MatchTopic( const char * pTopic,
if( ret != DefenderSuccess )
{
LogDebug( ( "The topic does not contain valid report format or suffix "
" needed to be a valid defender topic.\r\n" ) );
" needed to be a valid defender topic." ) );
}
}

Expand Down