da37e62d3e8242bf7b280f2a33427670c9d1e4e2 — Christopher Wellons 11 months ago 1af3809
Remove unnecessary argc check from cd

This check was preventing the no-argument form of cd from executing.
1 files changed, 0 insertions(+), 4 deletions(-)

M builtin/cd.c
M builtin/cd.c => builtin/cd.c +0 -4
@@ 52,10 52,6 @@ int builtin_cd(struct mrsh_state *state, int argc, char *argv[]) {
 			return EXIT_FAILURE;
 		}
 	}
-	if (mrsh_optind + 1 > argc) {
-		fprintf(stderr, cd_usage);
-		return EXIT_FAILURE;
-	}
 
 	if (mrsh_optind == argc) {
 		const char *home = mrsh_env_get(state, "HOME", NULL);