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:
parent
0925bf95ac
commit
504855ff96
12
expr.c
12
expr.c
|
@ -252,22 +252,12 @@ parse(char *expr[], int numexpr)
|
||||||
return (valp->str && *valp->str) || valp->num;
|
return (valp->str && *valp->str) || valp->num;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
usage(void)
|
|
||||||
{
|
|
||||||
enprintf(3, "usage: %s expression\n", argv0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ARGBEGIN {
|
argv0 = argv[0], argc--, argv++;
|
||||||
default:
|
|
||||||
usage();
|
|
||||||
} ARGEND;
|
|
||||||
|
|
||||||
ret = !parse(argv, argc);
|
ret = !parse(argv, argc);
|
||||||
enfshut(3, stdout, "<stdout>");
|
enfshut(3, stdout, "<stdout>");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user