From 11154be7bec2967b869fe385ab1df93a27efd82c Mon Sep 17 00:00:00 2001 From: Jiri Gaisler Date: Mon, 30 Nov 2020 22:52:27 +0100 Subject: Make grlib IP cores more modular and move them to grlib.c --- elf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'elf.c') 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); -- cgit v1.2.3