expr: Don't interpret any arguments

expr -1 '<' 1 failed previously.

There is no need to have usage at all, any errors will be flagged
up as necessary further down.
This commit is contained in:
sin 2015-04-21 17:08:14 +01:00
parent 0925bf95ac
commit 504855ff96

12
expr.c
View File

@ -252,22 +252,12 @@ parse(char *expr[], int numexpr)
return (valp->str && *valp->str) || valp->num;
}
static void
usage(void)
{
enprintf(3, "usage: %s expression\n", argv0);
}
int
main(int argc, char *argv[])
{
int ret;
ARGBEGIN {
default:
usage();
} ARGEND;
argv0 = argv[0], argc--, argv++;
ret = !parse(argv, argc);
enfshut(3, stdout, "<stdout>");