From mboxrd@z Thu Jan 1 00:00:00 1970 From: Syd Polk To: tromey@cygnus.com, Insight List Subject: Re: Patch: fixlet in gdbtk-cmds.c Date: Tue, 28 Nov 2000 12:55:00 -0000 Message-id: <4.2.0.58.20001128125809.01a7f100@pop.cygnus.com> References: <87zoik9bu1.fsf@creche.cygnus.com> X-SW-Source: 2000-q4/msg00297.html Approved, although I would have preferred using Tcl_WrongNumArgs. That would give a slightly different error message, however, and that might break some tests. At 11:43 AM 11/28/00 -0700, Tom Tromey wrote: >I found a buglet in gdbtk-cmds.c. This patch fixes it. Ok to commit? > >2000-11-28 Tom Tromey > > * gdbtk-cmds.c (gdb_clear_file): Return error if wrong number of > arguments given. > >Tom > >Index: generic/gdbtk-cmds.c >=================================================================== >RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v >retrieving revision 1.12 >diff -u -r1.12 gdbtk-cmds.c >--- gdbtk-cmds.c 2000/07/25 20:41:07 1.12 >+++ gdbtk-cmds.c 2000/11/28 18:33:19 >@@ -580,8 +606,11 @@ > Tcl_Obj *CONST objv[]; > { > if (objc != 1) >- Tcl_SetStringObj (result_ptr->obj_ptr, >- "Wrong number of args, none are allowed.", -1); >+ { >+ Tcl_SetStringObj (result_ptr->obj_ptr, >+ "Wrong number of args, none are allowed.", -1); >+ return TCL_ERROR; >+ } > > if (inferior_pid != 0 && target_has_execution) > { Syd Polk spolk@redhat.com Engineering Manager +1 415 777 9810 x 241 Red Hat, Inc.