From c258d7d0b607d18cb1fcdbc159ad7b722b474229 Mon Sep 17 00:00:00 2001 From: sin Date: Sat, 5 Oct 2013 15:08:06 +0100 Subject: [PATCH] Fix invalid use of optind in dirname(1) --- dirname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dirname.c b/dirname.c index 431291a..0321078 100644 --- a/dirname.c +++ b/dirname.c @@ -22,7 +22,7 @@ main(int argc, char *argv[]) if(argc < 1) usage(); - puts(dirname(argv[optind])); + puts(dirname(argv[0])); return 0; }