diff --git a/usr.bin/nice/nice.c b/usr.bin/nice/nice.c index 6b905d9879df..b34a9416a1af 100644 --- a/usr.bin/nice/nice.c +++ b/usr.bin/nice/nice.c @@ -64,6 +64,8 @@ main(argc, argv) { int niceness = DEFNICE; + if (argc < 2) + errx(1, "usage: nice [-number] command [arguments]"); if (argv[1][0] == '-') if (argv[1][1] == '-' || isdigit(argv[1][1])) { niceness = atoi(argv[1] + 1);