]> granicus.if.org Git - procps-ng/commitdiff
top: allow no input with the maximum task ('n') prompt
authorJim Warner <james.warner@comcast.net>
Wed, 27 Feb 2013 06:00:00 +0000 (00:00 -0600)
committerJaromir Capik <jcapik@redhat.com>
Fri, 1 Mar 2013 13:25:15 +0000 (14:25 +0100)
When both 'kill' and 'renice' commands were changed to
provide a default pid, the 'n' command (maximum tasks)
should have also changed to continue to accept just an
<Enter> key under the get_int function's new protocol.

This patch corrects that behavior, accepting no input.

(everything is perfectly justified plus right margins)
(are completely filled, but of course it must be luck)

Reference(s):
commit 39f4067c66141921a9ca2a5170df1fa2151f3182

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index ea31b6ce9dbabb83e874d084ff2b132bb2644431..ad0d00ef9266cac03d896d3cd37383c52db39ab8 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -4170,7 +4170,7 @@ static void keys_task (int ch) {
       case 'n':
          if (VIZCHKw(w)) {
             int num = get_int(fmtmk(N_fmt(GET_max_task_fmt), w->rc.maxtasks));
-            if (INT_MIN < num) {
+            if (GET_INTNONE < num) {
                if (-1 < num ) w->rc.maxtasks = num;
                else show_msg(N_txt(BAD_max_task_txt));
             }