* main.c (relocate_gdb_directory): Avoid calling stat function
if DIR is empty.
This commit is contained in:
parent
5b2ab15006
commit
78a8b30e9d
|
@ -1,3 +1,8 @@
|
||||||
|
2013-01-03 Pierre Muller <muller@sourceware.org>
|
||||||
|
|
||||||
|
* main.c (relocate_gdb_directory): Avoid calling stat function
|
||||||
|
if DIR is empty.
|
||||||
|
|
||||||
2013-01-03 Yao Qi <yao@codesourcery.com>
|
2013-01-03 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
* psymtab.c (fixup_psymbol_section): Update declaration.
|
* psymtab.c (fixup_psymbol_section): Update declaration.
|
||||||
|
|
|
@ -126,7 +126,7 @@ relocate_gdb_directory (const char *initial, int flag)
|
||||||
{
|
{
|
||||||
struct stat s;
|
struct stat s;
|
||||||
|
|
||||||
if (stat (dir, &s) != 0 || !S_ISDIR (s.st_mode))
|
if (*dir == '\0' || stat (dir, &s) != 0 || !S_ISDIR (s.st_mode))
|
||||||
{
|
{
|
||||||
xfree (dir);
|
xfree (dir);
|
||||||
dir = NULL;
|
dir = NULL;
|
||||||
|
|
Loading…
Reference in New Issue