diff options
author | Ian Lance Taylor <iant@google.com> | 2013-02-05 01:11:01 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2013-02-05 01:11:01 +0000 |
commit | 60e55b846fc24da2307fbe6537273ade3c1d1498 (patch) | |
tree | d18d67fd2cdfd72cc601609c2ecb3331d2c47493 /gcc/go | |
parent | e815f3bc66660b3450da3b660dc6aadaa81c5739 (diff) |
PR bootstrap/56198
compiler: Always initialize *nested_off in interpret_header.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@195747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/import-archive.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/import-archive.cc b/gcc/go/gofrontend/import-archive.cc index 032c6a0c1b5..9a1d5b3d7ef 100644 --- a/gcc/go/gofrontend/import-archive.cc +++ b/gcc/go/gofrontend/import-archive.cc @@ -277,6 +277,7 @@ Archive_file::interpret_header(const Archive_header* hdr, off_t off, return false; } + *nested_off = 0; if (hdr->ar_name[0] != '/') { const char* name_end = strchr(hdr->ar_name, '/'); @@ -288,7 +289,6 @@ Archive_file::interpret_header(const Archive_header* hdr, off_t off, return false; } pname->assign(hdr->ar_name, name_end - hdr->ar_name); - *nested_off = 0; } else if (hdr->ar_name[1] == ' ') { @@ -327,8 +327,7 @@ Archive_file::interpret_header(const Archive_header* hdr, off_t off, return false; } pname->assign(name, name_end - 1 - name); - if (nested_off != NULL) - *nested_off = y; + *nested_off = y; } return true; |