This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch]change dwarf2_start_subfile() to adapt inappropriate dir name
- From: Eli Zaretskii <eliz at gnu dot org>
- To: j0 dot kim at samsung dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 15 Nov 2010 06:08:15 +0200
- Subject: Re: [patch]change dwarf2_start_subfile() to adapt inappropriate dir name
- References: <19193243.6341289784074300.JavaMail.weblogic@epml17>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Mon, 15 Nov 2010 01:21:14 +0000 (GMT)
> From: JuYoung Kim <j0.kim@samsung.com>
> Cc: êìì <j0.kim@samsung.com>
>
> ÂÂif (!IS_ABSOLUTE_PATH (filename) && dirname != NULL) {
> ÂÂ Â if (dirname[strlen(dirname)-1] == '/' || dirname[strlen(dirname)-1] == '')
Please use IS_DIR_SEPARATOR instead of testing for '/' literally. And
the second part of the if clause cannot happen at all, so it should be
removed.
Also, the GNU coding standards say to put the braces like this:
if (something)
{
do_something;
do_something_else;
}
> ÂÂ Â else fullname = concat (dirname, SLASH_STRING, filename, (char *)NULL);
Make "else" have its own line, like this:
else
fullname = concat (dirname, SLASH_STRING, filename, NULL);