sh: Tweak some string constants to reduce code size.

* Reduce some needless differences.
* Shorten some error messages that should not happen.
This commit is contained in:
Jilles Tjoelker 2010-10-29 21:44:43 +00:00
parent d84c6760b4
commit 274110df0a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=214538
4 changed files with 5 additions and 5 deletions

View File

@ -1130,7 +1130,7 @@ commandcmd(int argc, char **argv)
return typecmd_impl(2, argv - 1, cmd, path);
}
if (argc != 0)
error("commandcmd() called while it should not be");
error("commandcmd bad call");
/*
* Do nothing successfully if no command was specified;

View File

@ -297,7 +297,7 @@ histcmd(int argc, char **argv)
laststr = argv[1];
break;
default:
error("too many args");
error("too many arguments");
}
/*
* Turn into event numbers.
@ -329,7 +329,7 @@ histcmd(int argc, char **argv)
editfile = editfilestr;
if ((efp = fdopen(fd, "w")) == NULL) {
close(fd);
error("can't allocate stdio buffer for temp");
error("Out of space");
}
}

View File

@ -1738,7 +1738,7 @@ getprompt(void *unused __unused)
char *fmt;
const char *pwd;
int i, trim;
static char internal_error[] = "<internal prompt error>";
static char internal_error[] = "??";
/*
* Select prompt format.

View File

@ -826,7 +826,7 @@ setvarcmd(int argc, char **argv)
else if (argc == 3)
setvar(argv[1], argv[2], 0);
else
error("List assignment not implemented");
error("too many arguments");
return 0;
}