Index: uspace/app/bdsh/cmds/modules/ls/ls.c
===================================================================
--- uspace/app/bdsh/cmds/modules/ls/ls.c	(revision 28594450f2551522ceb88a08fe134932564c07d6)
+++ uspace/app/bdsh/cmds/modules/ls/ls.c	(revision bdbb6f6e2d2ba190ccc8ccec3897b458fa47eada)
@@ -57,5 +57,5 @@
 /** Structure to represent a directory entry.
  *
- * Useful to keep together important informations
+ * Useful to keep together important information
  * for sorting directory entries.
  */
@@ -69,5 +69,5 @@
 static struct option const long_options[] = {
 	{ "help", no_argument, 0, 'h' },
-	{ "unsort", no_argument, 0, 'u' },	
+	{ "unsort", no_argument, 0, 'u' },
 	{ 0, 0, 0, 0 }
 };
@@ -246,6 +246,5 @@
 	}
 	
-	int dir = (int) argc > optind ? (int) argc - 1 : optind - 1;
-	argc -= (optind - 1);
+	argc -= optind;
 	
 	de.name = (char *) malloc(PATH_MAX);
@@ -256,8 +255,8 @@
 	memset(de.name, 0, sizeof(PATH_MAX));
 	
-	if (argc == 1)
+	if (argc == 0)
 		getcwd(de.name, PATH_MAX);
 	else
-		str_cpy(de.name, PATH_MAX, argv[dir]);
+		str_cpy(de.name, PATH_MAX, argv[optind]);
 	
 	if (stat(de.name, &de.s)) {
