/* ar.c - Archive modify and extract.
- Copyright (C) 1991-2017 Free Software Foundation, Inc.
+ Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of GNU Binutils.
arg_index = 0;
- if (argv[arg_index] == NULL)
- usage (0);
-
if (mri_mode)
{
default_deterministic ();
{
bfd *arch;
+ /* Fail if no files are specified on the command line.
+ (But not for MRI mode which allows for reading arguments
+ and filenames from stdin). */
+ if (argv[arg_index] == NULL)
+ usage (0);
+
/* We don't use do_quick_append any more. Too many systems
expect ar to always rebuild the symbol table even when q is
used. */
if (smart_rename (new_name, old_name, 0) != 0)
xexit (1);
free (old_name);
+ free (new_name);
}
/* Return a pointer to the pointer to the entry which should be rplacd'd