This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] jv-lang, guard against NULL
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Thu, 2 Aug 2007 17:06:06 -0400
- Subject: Re: [PATCH] jv-lang, guard against NULL
- References: <12757.12.7.175.2.1185924312.squirrel@webmail.sonic.net>
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