Fix GCC 3.4.4 warnings about ambigous else, in "else if" construct by

relying on the original indentation.

Change exit(0) to return 0; to kill off warning about "non-void
funtion".
This commit is contained in:
Joachim Nilsson 2008-06-08 23:45:07 +02:00
parent 5ffe54c277
commit c76941f24f

View File

@ -49,18 +49,21 @@ main(ac, av)
while ((p = readline(prompt)) != NULL) { while ((p = readline(prompt)) != NULL) {
(void)printf("\t\t\t|%s|\n", p); (void)printf("\t\t\t|%s|\n", p);
if (doit) if (doit) {
if (strncmp(p, "cd ", 3) == 0) { if (strncmp(p, "cd ", 3) == 0) {
if (chdir(&p[3]) < 0) if (chdir(&p[3]) < 0) {
perror(&p[3]); perror(&p[3]);
}
} }
else if (system(p) != 0) else if (system(p) != 0) {
perror(p); perror(p);
}
}
add_history(p); add_history(p);
free(p); free(p);
} }
exit(0);
/* NOTREACHED */ return 0;
} }
/* /*