diff options
Diffstat (limited to 'elf/dl-error.c')
-rw-r--r-- | elf/dl-error.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/elf/dl-error.c b/elf/dl-error.c index acb21a0414..b5af2e323f 100644 --- a/elf/dl-error.c +++ b/elf/dl-error.c @@ -43,8 +43,14 @@ _dl_catch_error (const char **errstring, signalled_errstring = signalled_objname = NULL; errcode = setjmp (catch_env); - (*operate) (); + if (errcode == 0) + { + (*operate) (); + return 0; + } + + /* We get here only if we longjmp'd out of OPERATE. */ *errstring = signalled_errstring; *objname = signalled_objname; - return *errstring ? errcode : 0; + return errcode == -1 ? 0 : errcode; } |