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]

Re: [PATCH] jv-lang, guard against NULL


On Tue, Jul 31, 2007 at 04:25:12PM -0700, Michael Snyder wrote:
> !   if (name != NULL && (i = strlen (name)) > 2 
> !       && name[i - 1] == ']' && tsuper != NULL)

Can we avoid assignments inside the if statement?  Also, there's an
unprotected call to strrchr above.  Maybe this should be an assert
instead, at the top of the function.

-- 
Daniel Jacobowitz
CodeSourcery


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