diff options
Diffstat (limited to 'gdb/cli/cli-dump.c')
-rw-r--r-- | gdb/cli/cli-dump.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index 7a58fcb..6bd40e0 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -132,7 +132,8 @@ bfd_openr_with_cleanup (const char *filename, const char *target) { bfd *ibfd; - if ((ibfd = bfd_openr (filename, target)) == NULL) + ibfd = bfd_openr (filename, target); + if (ibfd == NULL) error ("Failed to open %s: %s.", filename, bfd_errmsg (bfd_get_error ())); @@ -150,7 +151,8 @@ bfd_openw_with_cleanup (char *filename, const char *target, char *mode) if (*mode == 'w') /* Write: create new file */ { - if ((obfd = bfd_openw (filename, target)) == NULL) + obfd = bfd_openw (filename, target); + if (obfd == NULL) error ("Failed to open %s: %s.", filename, bfd_errmsg (bfd_get_error ())); make_cleanup_bfd_close (obfd); |