summaryrefslogtreecommitdiffstats
path: root/elf.c
diff options
context:
space:
mode:
authorJiri Gaisler <jiri@gaisler.se>2020-11-30 22:52:27 +0100
committerJiri Gaisler <jiri@gaisler.se>2020-12-01 16:44:49 +0100
commit11154be7bec2967b869fe385ab1df93a27efd82c (patch)
tree955b1c03b0ea4bd3bf6d36af9ec0431c27391401 /elf.c
parentAdd %asr22/23 support to leon3 (diff)
downloadsis-11154be7bec2967b869fe385ab1df93a27efd82c.tar.bz2
Make grlib IP cores more modular and move them to grlib.c
Diffstat (limited to 'elf.c')
-rw-r--r--elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/elf.c b/elf.c
index f1d0a37..384502e 100644
--- a/elf.c
+++ b/elf.c
@@ -240,13 +240,13 @@ elf_load (char *fname, int load)
res = read_elf_header (fp);
- if (res < 0)
+ if (res == -1)
printf ("File read error\n");
- if (load && (res >= 0))
+ else if (load)
{
res = read_elf_body ();
- if (res < 0)
+ if (res == -1)
printf ("File read error\n");
else
printf (" Loaded %s, entry 0x%08x\n", fname, res);