about summary refs log tree commit diff stats
path: root/src/tools/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/parser.c')
-rw-r--r--src/tools/parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/parser.c b/src/tools/parser.c
index 240d5358..2e1d5c98 100644
--- a/src/tools/parser.c
+++ b/src/tools/parser.c
@@ -48,7 +48,7 @@
  *
  * inp - The line of input
  * min - The minimum allowed number of arguments
- * max - The maximum allowed number of arguments, -1 for infinite
+ * max - The maximum allowed number of arguments
  *
  * Returns - An NULL terminated array of strings representing the arguments
  * of the command, or NULL if the validation fails.
@@ -135,7 +135,7 @@ parse_args(const char* const inp, int min, int max, gboolean* result)
     int num = g_slist_length(tokens) - 1;
 
     // if num args not valid return NULL
-    if ((num < min) || ((max != -1) && (num > max))) {
+    if ((num < min) || (num > max)) {
         g_slist_free_full(tokens, free);
         g_free(copy);
         *result = FALSE;