Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/renice Fix usage check; reject renice without any ta...



details:   https://anonhg.NetBSD.org/src/rev/96a06551c25f
branches:  trunk
changeset: 956137:96a06551c25f
user:      dholland <dholland%NetBSD.org@localhost>
date:      Thu Oct 22 19:34:12 2020 +0000

description:
Fix usage check; reject renice without any targets, whether or not -n given.

diffstat:

 usr.bin/renice/renice.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 9ab9eb46069c -r 96a06551c25f usr.bin/renice/renice.c
--- a/usr.bin/renice/renice.c   Thu Oct 22 19:30:37 2020 +0000
+++ b/usr.bin/renice/renice.c   Thu Oct 22 19:34:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: renice.c,v 1.18 2008/07/21 14:19:25 lukem Exp $        */
+/*     $NetBSD: renice.c,v 1.19 2020/10/22 19:34:12 dholland Exp $     */
 
 /*
  * Copyright (c) 1983, 1989, 1993
@@ -37,7 +37,7 @@
 
 #ifndef lint
 /*static char sccsid[] = "from: @(#)renice.c   8.1 (Berkeley) 6/9/93";*/
-__RCSID("$NetBSD: renice.c,v 1.18 2008/07/21 14:19:25 lukem Exp $");
+__RCSID("$NetBSD: renice.c,v 1.19 2020/10/22 19:34:12 dholland Exp $");
 #endif /* not lint */
 
 #include <sys/resource.h>
@@ -73,7 +73,7 @@
        if (strcmp(*argv, "-n") == 0) {
                incr = 1;
                argc--, argv++;
-               if (argc == 0)
+               if (argc < 2)
                        usage();
        }
        if (getnum("priority", *argv, &prio))



Home | Main Index | Thread Index | Old Index