diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2022-01-24 10:03:47 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas_schwinge@mentor.com> | 2022-01-24 10:06:43 +0100 |
commit | 21af490baa734a901fb798bc2ac4df62109bc895 (patch) | |
tree | a292dc4ac7de999d47f20ab9a2dff597afadea2a /libcpp/files.c | |
parent | 2cce6b8919ce16acd37a7a203049a52925a7e295 (diff) | |
parent | 490e23032baaece71f2ec09fa1805064b150fbc2 (diff) | |
download | gcc-21af490baa734a901fb798bc2ac4df62109bc895.zip gcc-21af490baa734a901fb798bc2ac4df62109bc895.tar.gz gcc-21af490baa734a901fb798bc2ac4df62109bc895.tar.bz2 |
Merge commit '490e23032baaece71f2ec09fa1805064b150fbc2' [#247]
Diffstat (limited to 'libcpp/files.c')
-rw-r--r-- | libcpp/files.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libcpp/files.c b/libcpp/files.c index c93a03c..24208f7 100644 --- a/libcpp/files.c +++ b/libcpp/files.c @@ -1,5 +1,5 @@ /* Part of CPP library. File handling. - Copyright (C) 1986-2021 Free Software Foundation, Inc. + Copyright (C) 1986-2022 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -553,12 +553,11 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir, { /* If *hash_slot is NULL, the above htab_find_slot_with_hash call just created the - slot, but we aren't going to store there - anything, so need to remove the newly created - entry. htab_clear_slot requires that it is - non-NULL, so store there some non-NULL pointer, - htab_clear_slot will overwrite it - immediately. */ + slot, but we aren't going to store there anything + of use, so need to remove the newly created entry. + htab_clear_slot requires that it is non-NULL, so + store some non-NULL but valid pointer there, + htab_clear_slot will immediately overwrite it. */ *hash_slot = file; htab_clear_slot (pfile->file_hash, hash_slot); } @@ -582,7 +581,7 @@ _cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir, if (*hash_slot == NULL) { /* See comment on the above htab_clear_slot call. */ - *hash_slot = file; + *hash_slot = &hash_slot; htab_clear_slot (pfile->file_hash, hash_slot); } return NULL; |