remove duplicated usage string from commit rev 1.2

fix usage()
This commit is contained in:
Wolfram Schneider 1996-11-02 15:28:57 +00:00
parent 00cb92bf59
commit 5a52948cf6

View File

@ -65,7 +65,8 @@ main(argc, argv)
int niceness = DEFNICE;
if (argc < 2)
errx(1, "usage: nice [-number] command [arguments]");
usage();
if (argv[1][0] == '-')
if (argv[1][1] == '-' || isdigit(argv[1][1])) {
niceness = atoi(argv[1] + 1);
@ -89,7 +90,6 @@ main(argc, argv)
void
usage()
{
(void)fprintf(stderr,
"nice [ -# ] command [ options ] [ operands ]\n");
(void)fprintf(stderr, "usage: nice [-number] command [arguments]\n");
exit(1);
}