[patch]change dwarf2_start_subfile() to adapt inappropriate dir name
Eli Zaretskii
eliz@gnu.org
Mon Nov 15 04:09:00 GMT 2010
> 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);
More information about the Gdb-patches
mailing list