summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2018-08-19 08:50:19 +0200
committerJoel Rosdahl <joel@rosdahl.net>2018-08-19 08:50:19 +0200
commit6bf4382fefc32ee0c213a2e1671ea3fc6311c70a (patch)
tree5fb64d03be052d2af3bcbad48e0d22249ad25679
parent105f611f9378d14b6e4f690b011bb1c0a6b6d039 (diff)
downloadccache-6bf4382fefc32ee0c213a2e1671ea3fc6311c70a.tar.gz
Fix “clang analyze” false positive
-rw-r--r--src/ccache.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ccache.c b/src/ccache.c
index e3b8886f..f363e948 100644
--- a/src/ccache.c
+++ b/src/ccache.c
@@ -781,10 +781,7 @@ process_preprocessed_file(struct mdfour *hash, const char *path, bool pump)
included_files = create_hashtable(1000, hash_from_string, strings_equal);
}
- char *cwd = NULL;
- if (!conf->hash_dir) {
- cwd = gnu_getcwd();
- }
+ char *cwd = gnu_getcwd();
// Bytes between p and q are pending to be hashed.
char *p = data;