* ar.c (move_members): Fix it so that the abi positional modifiers
authorSteve Chamberlain <sac@cygnus>
Wed, 9 Mar 1994 21:53:54 +0000 (21:53 +0000)
committerSteve Chamberlain <sac@cygnus>
Wed, 9 Mar 1994 21:53:54 +0000 (21:53 +0000)
don't delete all archive members following the insert point.

binutils/ChangeLog
binutils/ar.c

index 8f7f1da477804ce3aee843f826d022a941e1f9c1..f7e7e369b5f7e2453e25d100d39e1a1d2e869ddc 100644 (file)
@@ -1,3 +1,8 @@
+Wed Mar  9 13:48:11 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
+
+       * ar.c (move_members): Fix it so that the abi positional modifiers
+       don't delete all archive members following the insert point.
+
 Tue Mar  8 13:14:43 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
 
        * coffgrok.[ch]: New files, understand coff objects.
index b968c8936e2f4e6673e2af3ca0c56ad7b9165b36..19491717b2645b3494514accc048ef6fe44ec695 100644 (file)
@@ -883,18 +883,21 @@ move_members (files_to_move)
            {
              /* Move this file to the end of the list - first cut from
                 where it is.  */
+             bfd *link;
              *current_ptr_ptr = current_ptr->next;
 
              /* Now glue to end */
              after_bfd = get_pos_bfd (&inarch->next, pos_end);
+             link = *after_bfd;
              *after_bfd = current_ptr;
-             current_ptr->next = (bfd *) NULL;
+             current_ptr->next = link;
 
              if (verbose)
                printf ("m - %s\n", *files_to_move);
 
              goto next_file;
            }
+
          current_ptr_ptr = &((*current_ptr_ptr)->next);
        }
       fprintf (stderr, "%s: no entry %s in archive %s!\n",