* bfd.c (bfd_get_error, bfd_set_error): New functions.
[deliverable/binutils-gdb.git] / bfd / core.c
index bcdb9a4de484d467d52b3f09703c0430de95e322..c143776b9d391983af4e32f237ccb5af924d6502 100644 (file)
@@ -49,7 +49,7 @@ DEFUN(bfd_core_file_failing_command,(abfd),
       bfd *abfd)
 {
   if (abfd->format != bfd_core) {
-    bfd_error = invalid_operation;
+    bfd_set_error (bfd_error_invalid_operation);
     return NULL;
   }
   return BFD_SEND (abfd, _core_file_failing_command, (abfd));
@@ -72,7 +72,7 @@ bfd_core_file_failing_signal (abfd)
      bfd *abfd;
 {
   if (abfd->format != bfd_core) {
-    bfd_error = invalid_operation;
+    bfd_set_error (bfd_error_invalid_operation);
     return 0;
   }
   return BFD_SEND (abfd, _core_file_failing_signal, (abfd));
@@ -97,7 +97,7 @@ core_file_matches_executable_p (core_bfd, exec_bfd)
      bfd *core_bfd, *exec_bfd;
 {
     if ((core_bfd->format != bfd_core) || (exec_bfd->format != bfd_object)) {
-           bfd_error = wrong_format;
+           bfd_set_error (bfd_error_wrong_format);
            return false;
        }
 
This page took 0.025571 seconds and 4 git commands to generate.