perf1: check argv[optind] instead of argv[1]
authorJeff Layton <jlayton@redhat.com>
Fri, 3 May 2013 10:56:14 +0000 (06:56 -0400)
committerJeff Layton <jlayton@redhat.com>
Fri, 3 May 2013 10:56:14 +0000 (06:56 -0400)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
perf1.c

diff --git a/perf1.c b/perf1.c
index c4d25ae875ccde6c659a9755437be8687b6eb007..4a33f7477a4c2052f086b830227bfd57f59240fc 100644 (file)
--- a/perf1.c
+++ b/perf1.c
@@ -78,7 +78,7 @@ main(int argc, char **argv)
                }
        }
 
-       if (!argv[1]) {
+       if (!argv[optind]) {
                usage(argv[0]);
                return 1;
        }