Add const qualifiers, use size_t where appropriate.

This commit is contained in:
Ralf Corsepius
2006-12-06 09:46:46 +00:00
parent 6876ce7a44
commit f5c5a1db6a
4 changed files with 19 additions and 19 deletions

View File

@@ -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
);
/**

View File

@@ -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++ )

View File

@@ -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++;

View File

@@ -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;