aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-03-10 06:57:14 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-03-10 06:57:14 -0700
commit5656ba2c217cff434621d6caf135cbda5ae92ac4 (patch)
treea716fe4b6ecd1eee3844dd554df0ec820f4f5b3f /binutils/readelf.c
parentb6370efb1efe39e62abd01e95c7957834c8bdf47 (diff)
downloadgdb-5656ba2c217cff434621d6caf135cbda5ae92ac4.zip
gdb-5656ba2c217cff434621d6caf135cbda5ae92ac4.tar.gz
gdb-5656ba2c217cff434621d6caf135cbda5ae92ac4.tar.bz2
Move nothing to do warning to main
PR binutils/18101 * readelf.c (parse_args): Move nothing to do warning to ... (main): Here.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 771d29d..20cfc47 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4232,11 +4232,6 @@ parse_args (int argc, char ** argv)
&& !do_section_groups && !do_archive_index
&& !do_dyn_syms)
usage (stderr);
- else if (argc < 3 || (do_wide && argc < 4))
- {
- warn (_("Nothing to do.\n"));
- usage (stderr);
- }
}
static const char *
@@ -16131,6 +16126,11 @@ main (int argc, char ** argv)
if (optind < (argc - 1))
show_name = 1;
+ else if (optind >= argc)
+ {
+ warn (_("Nothing to do.\n"));
+ usage (stderr);
+ }
err = 0;
while (optind < argc)