Skip to content

Commit

Permalink
Fix few MISRA violations
Browse files Browse the repository at this point in the history
  • Loading branch information
AniruddhaKanhere committed Feb 20, 2024
1 parent 5a39d63 commit 9c67ec8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions source/core_http_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,32 +1547,32 @@ static HTTPStatus_t writeRequestLine( HTTPRequestHeaders_t * pRequestHeaders,
{
/* Write "<METHOD> <PATH> HTTP/1.1\r\n" to start the HTTP header. */
( void ) memcpy( pBufferCur, pMethod, methodLen );
pBufferCur += methodLen;
pBufferCur = &pBufferCur[ methodLen ];

*pBufferCur = SPACE_CHARACTER;
pBufferCur += SPACE_CHARACTER_LEN;
pBufferCur = &pBufferCur[ SPACE_CHARACTER_LEN ];

/* Use "/" as default value if <PATH> is NULL. */
if( ( pPath == NULL ) || ( pathLen == 0U ) )
{
( void ) memcpy( pBufferCur,
pHttpEmptyPath,
HTTP_EMPTY_PATH_LEN );
pBufferCur += HTTP_EMPTY_PATH_LEN;
pBufferCur = &pBufferCur[ HTTP_EMPTY_PATH_LEN ];
}
else
{
( void ) memcpy( pBufferCur, pPath, pathLen );
pBufferCur += pathLen;
pBufferCur = &pBufferCur[ pathLen ];
}

*pBufferCur = SPACE_CHARACTER;
pBufferCur += SPACE_CHARACTER_LEN;
pBufferCur = &pBufferCur[ SPACE_CHARACTER_LEN ];

( void ) memcpy( pBufferCur,
pHttpProtocolVersion,
HTTP_PROTOCOL_VERSION_LEN );
pBufferCur += HTTP_PROTOCOL_VERSION_LEN;
pBufferCur = &pBufferCur[ HTTP_PROTOCOL_VERSION_LEN ];
( void ) memcpy( pBufferCur,
pHeaderLineSeparator,
HTTP_HEADER_LINE_SEPARATOR_LEN );
Expand Down

0 comments on commit 9c67ec8

Please sign in to comment.