This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 06/40] remove erroneous return from setup_user_args


This fixes setup_user_args to drop a useless and confusing "return".

	* cli/cli-script.c (setup_user_args): Don't return after error.
---
 gdb/cli/cli-script.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 3b24799..43fd479 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -689,11 +689,8 @@ setup_user_args (char *p)
       int bsquote = 0;
 
       if (arg_count >= MAXUSERARGS)
-	{
-	  error (_("user defined function may only have %d arguments."),
-		 MAXUSERARGS);
-	  return old_chain;
-	}
+	error (_("user defined function may only have %d arguments."),
+	       MAXUSERARGS);
 
       /* Strip whitespace.  */
       while (*p == ' ' || *p == '\t')
-- 
1.8.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]