aboutsummaryrefslogtreecommitdiff
path: root/libcpp/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/files.c')
-rw-r--r--libcpp/files.c15
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;