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]change dwarf2_start_subfile() to adapt inappropriate dir name


> 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);


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