From 3813fda44adcea486b7308423a699f63d79273ee Mon Sep 17 00:00:00 2001 From: zwelch Date: Tue, 23 Jun 2009 22:42:03 +0000 Subject: - Fixes '==' whitespace - Replace ')\(==\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(==\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2371 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/target/image.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/target/image.c') diff --git a/src/target/image.c b/src/target/image.c index 2ce03b82..d8c0cfc4 100644 --- a/src/target/image.c +++ b/src/target/image.c @@ -34,11 +34,11 @@ /* convert ELF header field to host endianness */ #define field16(elf,field)\ - ((elf->endianness==ELFDATA2LSB)? \ + ((elf->endianness == ELFDATA2LSB)? \ le_to_h_u16((uint8_t*)&field):be_to_h_u16((uint8_t*)&field)) #define field32(elf,field)\ - ((elf->endianness==ELFDATA2LSB)? \ + ((elf->endianness == ELFDATA2LSB)? \ le_to_h_u32((uint8_t*)&field):be_to_h_u32((uint8_t*)&field)) static int autodetect_image_type(image_t *image, char *url) @@ -55,7 +55,7 @@ static int autodetect_image_type(image_t *image, char *url) } retval = fileio_read(&fileio, 9, buffer, &read_bytes); - if (retval==ERROR_OK) + if (retval == ERROR_OK) { if (read_bytes != 9) { @@ -68,7 +68,7 @@ static int autodetect_image_type(image_t *image, char *url) return retval; /* check header against known signatures */ - if (strncmp((char*)buffer,ELFMAG,SELFMAG)==0) + if (strncmp((char*)buffer,ELFMAG,SELFMAG) == 0) { LOG_DEBUG("ELF image detected."); image->type = IMAGE_ELF; @@ -382,7 +382,7 @@ static int image_elf_read_headers(image_t *image) } elf->segment_count = field16(elf,elf->header->e_phnum); - if (elf->segment_count==0) + if (elf->segment_count == 0) { LOG_ERROR("invalid ELF file, no program headers"); return ERROR_IMAGE_FORMAT_ERROR; -- cgit v1.2.3