aqhome: make some parameters const.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
GWEN_LIST_FUNCTIONS(AQH_FLASHRECORD, AQH_FlashRecord)
|
||||
|
||||
|
||||
AQH_HEXFILERECORD *_sampleAdjacentHexfileRecords(AQH_FLASHRECORD *fr, AQH_HEXFILERECORD *hrStart);
|
||||
const AQH_HEXFILERECORD *_sampleAdjacentHexfileRecords(AQH_FLASHRECORD *fr, const AQH_HEXFILERECORD *hrStart);
|
||||
|
||||
|
||||
|
||||
@@ -124,10 +124,10 @@ void AQH_FlashRecord_CopyAndSetData(AQH_FLASHRECORD *fr, uint32_t dataLength, co
|
||||
|
||||
|
||||
|
||||
AQH_FLASHRECORD_LIST *AQH_FlashRecord_fromHexfileRecords(AQH_HEXFILERECORD_LIST *hexFileRecordList)
|
||||
AQH_FLASHRECORD_LIST *AQH_FlashRecord_fromHexfileRecords(const AQH_HEXFILERECORD_LIST *hexFileRecordList)
|
||||
{
|
||||
AQH_FLASHRECORD_LIST *flashRecordList;
|
||||
AQH_HEXFILERECORD *hr;
|
||||
const AQH_HEXFILERECORD *hr;
|
||||
uint32_t currentOffset=0;
|
||||
|
||||
flashRecordList=AQH_FlashRecord_List_new();
|
||||
@@ -154,7 +154,18 @@ AQH_FLASHRECORD_LIST *AQH_FlashRecord_fromHexfileRecords(AQH_HEXFILERECORD_LIST
|
||||
return NULL;
|
||||
}
|
||||
ptr=AQH_HexfileRecord_GetDataPointer(hr);
|
||||
currentOffset=((ptr[0]<<8)+ptr[1])<<4;
|
||||
currentOffset=((ptr[1]<<8)+ptr[0])<<4;
|
||||
}
|
||||
else if (t==AQH_HEXFILERECORD_TYPE_EXTLINEARADDR) {
|
||||
const uint8_t *ptr;
|
||||
|
||||
if (AQH_HexfileRecord_GetByteCount(hr)<2) {
|
||||
DBG_ERROR(AQH_LOGDOMAIN, "Invalid EXTLINEARADDR record (04) in file (too few data bytes)");
|
||||
AQH_FlashRecord_List_free(flashRecordList);
|
||||
return NULL;
|
||||
}
|
||||
ptr=AQH_HexfileRecord_GetDataPointer(hr);
|
||||
currentOffset=((ptr[1]<<8)+ptr[0])<<16;
|
||||
}
|
||||
else if (t==AQH_HEXFILERECORD_TYPE_EOF) {
|
||||
break;
|
||||
@@ -173,10 +184,10 @@ AQH_FLASHRECORD_LIST *AQH_FlashRecord_fromHexfileRecords(AQH_HEXFILERECORD_LIST
|
||||
|
||||
|
||||
|
||||
AQH_HEXFILERECORD *_sampleAdjacentHexfileRecords(AQH_FLASHRECORD *fr, AQH_HEXFILERECORD *hrStart)
|
||||
const AQH_HEXFILERECORD *_sampleAdjacentHexfileRecords(AQH_FLASHRECORD *fr, const AQH_HEXFILERECORD *hrStart)
|
||||
{
|
||||
AQH_HEXFILERECORD *hrNext;
|
||||
AQH_HEXFILERECORD *hr;
|
||||
const AQH_HEXFILERECORD *hrNext;
|
||||
const AQH_HEXFILERECORD *hr;
|
||||
uint32_t len=0;
|
||||
|
||||
hrNext=AQH_HexfileRecord_List_FindNonAdjacentDataRecord(hrStart);
|
||||
|
||||
Reference in New Issue
Block a user