From 0523929d4a81eeae137a4cfbc52f607a78bc57df Mon Sep 17 00:00:00 2001 From: deep-42-thought Date: Sun, 4 Dec 2016 16:02:38 +0100 Subject: [PATCH] top.cc: remove hard coded values of MAX_SP (#346) --- src/top.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/top.cc b/src/top.cc index 98907f48..3217c1ac 100644 --- a/src/top.cc +++ b/src/top.cc @@ -661,8 +661,8 @@ int parse_top_args(const char *s, const char *arg, struct text_object *obj) free_and_zero(obj->data.opaque); return 0; } - if (n < 1 || n > 10) { - NORM_ERR("invalid num arg for top. Must be between 1 and 10."); + if (n < 1 || n > MAX_SP) { + NORM_ERR("invalid num arg for top. Must be between 1 and %d.", MAX_SP); free_and_zero(td->s); free_and_zero(obj->data.opaque); return 0;