diff options
author | Pierre Muller <muller@ics.u-strasbg.fr> | 2013-01-03 22:18:32 +0000 |
---|---|---|
committer | Pierre Muller <muller@ics.u-strasbg.fr> | 2013-01-03 22:18:32 +0000 |
commit | 797f8f366fa34dda9fc6d522987bcb1fd963c937 (patch) | |
tree | 2f65d0b691b2b5d2f903ca9cfa2b20c27db9715c /gdb/main.c | |
parent | e413a27b027cbfca083b18beb3a25f02613ca917 (diff) | |
download | gdb-797f8f366fa34dda9fc6d522987bcb1fd963c937.tar.gz |
* main.c (relocate_gdb_directory): Avoid calling stat function
if DIR is empty.
Diffstat (limited to 'gdb/main.c')
-rw-r--r-- | gdb/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/main.c b/gdb/main.c index 14893bdffd0..7cd2d03d957 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -126,7 +126,7 @@ relocate_gdb_directory (const char *initial, int flag) { 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); dir = NULL; |