Add parens like the comment says.
[deliverable/binutils-gdb.git] / bfd / i386lynx.c
index 6b27bd19ed317124b7c063543114a62fd142e1a1..a999dd0f6aec5f8878507c5e4ca31bd7eec446cf 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD back-end for i386 a.out binaries under LynxOS.
-   Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
+   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1999
+   Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -97,7 +98,7 @@ const bfd_target *lynx_core_file_p ();
 #endif /* LYNX_CORE */
 \f
 
-#define KEEPIT flags
+#define KEEPIT udata.i
 
 extern reloc_howto_type aout_32_ext_howto_table[];
 extern reloc_howto_type aout_32_std_howto_table[];
@@ -157,8 +158,7 @@ NAME(lynx,swap_std_reloc_out) (abfd, g, natptr)
        {
          /* Fill in symbol */
          r_extern = 1;
-         r_index = stoi ((*(g->sym_ptr_ptr))->KEEPIT);
-
+         r_index = (*g->sym_ptr_ptr)->KEEPIT;
        }
     }
   else
@@ -169,7 +169,7 @@ NAME(lynx,swap_std_reloc_out) (abfd, g, natptr)
     }
 
   /* now the fun stuff */
-  if (abfd->xvec->header_byteorder_big_p != false)
+  if (bfd_header_big_endian (abfd))
     {
       natptr->r_index[0] = r_index >> 16;
       natptr->r_index[1] = r_index >> 8;
@@ -243,7 +243,7 @@ NAME(lynx,swap_ext_reloc_out) (abfd, g, natptr)
       else
        {
          r_extern = 1;
-         r_index = stoi ((*(g->sym_ptr_ptr))->KEEPIT);
+         r_index = (*g->sym_ptr_ptr)->KEEPIT;
        }
     }
   else
@@ -255,7 +255,7 @@ NAME(lynx,swap_ext_reloc_out) (abfd, g, natptr)
 
 
   /* now the fun stuff */
-  if (abfd->xvec->header_byteorder_big_p != false)
+  if (bfd_header_big_endian (abfd))
     {
       natptr->r_index[0] = r_index >> 16;
       natptr->r_index[1] = r_index >> 8;
@@ -325,7 +325,7 @@ NAME(lynx,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
      struct reloc_ext_external *bytes;
      arelent *cache_ptr;
      asymbol **symbols;
-     bfd_size_type symcount;
+     bfd_size_type symcount ATTRIBUTE_UNUSED;
 {
   int r_index;
   int r_extern;
@@ -349,7 +349,7 @@ NAME(lynx,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
      struct reloc_std_external *bytes;
      arelent *cache_ptr;
      asymbol **symbols;
-     bfd_size_type symcount;
+     bfd_size_type symcount ATTRIBUTE_UNUSED;
 {
   int r_index;
   int r_extern;
@@ -418,12 +418,9 @@ doit:
   count = reloc_size / each_size;
 
 
-  reloc_cache = (arelent *) malloc (count * sizeof (arelent));
+  reloc_cache = (arelent *) bfd_malloc (count * sizeof (arelent));
   if (!reloc_cache && count != 0)
-    {
-      bfd_set_error (bfd_error_no_memory);
-      return false;
-    }
+    return false;
   memset (reloc_cache, 0, count * sizeof (arelent));
 
   relocs = (PTR) bfd_alloc (abfd, reloc_size);
This page took 0.037208 seconds and 4 git commands to generate.