aboutsummaryrefslogtreecommitdiff
path: root/hw/core/loader.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/loader.c')
-rw-r--r--hw/core/loader.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c
index c7182dfa64..c4f62fe427 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -244,26 +244,26 @@ int load_aout(const char *filename, hwaddr addr, int max_sz,
case OMAGIC:
if (e.a_text + e.a_data > max_sz)
goto fail;
- lseek(fd, N_TXTOFF(e), SEEK_SET);
- size = read_targphys(filename, fd, addr, e.a_text + e.a_data);
- if (size < 0)
- goto fail;
- break;
+ lseek(fd, N_TXTOFF(e), SEEK_SET);
+ size = read_targphys(filename, fd, addr, e.a_text + e.a_data);
+ if (size < 0)
+ goto fail;
+ break;
case NMAGIC:
if (N_DATADDR(e, target_page_size) + e.a_data > max_sz)
goto fail;
- lseek(fd, N_TXTOFF(e), SEEK_SET);
- size = read_targphys(filename, fd, addr, e.a_text);
- if (size < 0)
- goto fail;
+ lseek(fd, N_TXTOFF(e), SEEK_SET);
+ size = read_targphys(filename, fd, addr, e.a_text);
+ if (size < 0)
+ goto fail;
ret = read_targphys(filename, fd, addr + N_DATADDR(e, target_page_size),
e.a_data);
- if (ret < 0)
- goto fail;
- size += ret;
- break;
+ if (ret < 0)
+ goto fail;
+ size += ret;
+ break;
default:
- goto fail;
+ goto fail;
}
close(fd);
return size;