forked from Imagelibrary/rtems
Add const qualifiers, use size_t where appropriate.
This commit is contained in:
@@ -535,8 +535,8 @@ void _Objects_Free(
|
||||
* @param[in] length is the length of the object name field.
|
||||
*/
|
||||
void _Objects_Clear_name(
|
||||
void *name,
|
||||
uint16_t length
|
||||
void *name,
|
||||
const size_t length
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -547,9 +547,9 @@ void _Objects_Clear_name(
|
||||
* @param[in] length is the number of bytes to copy.
|
||||
*/
|
||||
void _Objects_Copy_name_string(
|
||||
void *source,
|
||||
void *destination,
|
||||
uint16_t length
|
||||
const void *source,
|
||||
void *destination,
|
||||
const size_t length
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -560,9 +560,9 @@ void _Objects_Copy_name_string(
|
||||
* @param[in] length is the number of bytes to copy.
|
||||
*/
|
||||
void _Objects_Copy_name_raw(
|
||||
void *source,
|
||||
void *destination,
|
||||
uint16_t length
|
||||
const void *source,
|
||||
void *destination,
|
||||
const size_t length
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
*/
|
||||
|
||||
void _Objects_Clear_name(
|
||||
void *name,
|
||||
uint16_t length
|
||||
void *name,
|
||||
const size_t length
|
||||
)
|
||||
{
|
||||
uint32_t index;
|
||||
uint32_t maximum = length / OBJECTS_NAME_ALIGNMENT;
|
||||
size_t index;
|
||||
size_t maximum = length / OBJECTS_NAME_ALIGNMENT;
|
||||
uint32_t *name_ptr = (uint32_t *) name;
|
||||
|
||||
for ( index=0 ; index < maximum ; index++ )
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
*/
|
||||
|
||||
void _Objects_Copy_name_raw(
|
||||
void *source,
|
||||
void *destination,
|
||||
uint16_t length
|
||||
const void *source,
|
||||
void *destination,
|
||||
const size_t length
|
||||
)
|
||||
{
|
||||
uint32_t *source_p = (uint32_t *) source;
|
||||
uint32_t *destination_p = (uint32_t *) destination;
|
||||
uint32_t tmp_length = length / OBJECTS_NAME_ALIGNMENT;
|
||||
size_t tmp_length = length / OBJECTS_NAME_ALIGNMENT;
|
||||
|
||||
while ( tmp_length-- )
|
||||
*destination_p++ = *source_p++;
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
*/
|
||||
|
||||
void _Objects_Copy_name_string(
|
||||
void *source,
|
||||
void *destination,
|
||||
uint16_t length
|
||||
const void *source,
|
||||
void *destination,
|
||||
const size_t length
|
||||
)
|
||||
{
|
||||
uint8_t *source_p = (uint8_t *) source;
|
||||
|
||||
Reference in New Issue
Block a user