}
fileio_close(&fileio);
- if (retval!=ERROR_OK)
+ if (retval != ERROR_OK)
return retval;
/* check header against known signatures */
return ERROR_FILEIO_OPERATION_FAILED;
}
- if (strncmp((char*)elf->header->e_ident,ELFMAG,SELFMAG)!=0)
+ if (strncmp((char*)elf->header->e_ident,ELFMAG,SELFMAG) != 0)
{
LOG_ERROR("invalid ELF file, bad magic number");
return ERROR_IMAGE_FORMAT_ERROR;
}
elf->endianness = elf->header->e_ident[EI_DATA];
- if ((elf->endianness!=ELFDATA2LSB)
- &&(elf->endianness!=ELFDATA2MSB))
+ if ((elf->endianness != ELFDATA2LSB)
+ &&(elf->endianness != ELFDATA2MSB))
{
LOG_ERROR("invalid ELF file, unknown endianess setting");
return ERROR_IMAGE_FORMAT_ERROR;
}
else if (record_type >= 1 && record_type <= 3)
{
- switch( record_type )
+ switch ( record_type )
{
case 1:
/* S1 - 16 bit address data record */
int section;
for (section=0; section < image->num_sections; section++)
{
- image->sections[section].base_address+=image->base_address;
+ image->sections[section].base_address += image->base_address;
}
/* we're done relocating. The two statements below are mainly
* for documenation purposes: stop anyone from empirically
{
run=32768;
}
- nbytes-=run;
+ nbytes -= run;
while (run--)
{
/* as per gdb */