From: Joel Rosdahl Date: Sun, 25 Apr 2010 15:02:25 +0000 (+0200) Subject: Improve comments in hash_include_file_string X-Git-Tag: v3.0pre1~62 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=6faf3267d20f9c758d53f25aaef79d45195a0948;p=thirdparty%2Fccache.git Improve comments in hash_include_file_string --- diff --git a/ccache.c b/ccache.c index c8f5cb838..8a43519a7 100644 --- a/ccache.c +++ b/ccache.c @@ -386,12 +386,10 @@ static char *make_relative_path(char *path) /* * This function reads and hashes a file. While doing this, it also does these - * things: + * things with preprocessor lines starting with a hash: * - * - Makes include file paths whose prefix is CCACHE_BASEDIR relative when - * computing the hash sum. - * - Stores the paths and hashes of included files in the global variable - * included_files. + * - Makes include file paths whose prefix is CCACHE_BASEDIR relative. + * - Stores the paths of included files in the global variable included_files. */ static int process_preprocessed_file(struct mdfour *hash, const char *path) { diff --git a/hashutil.c b/hashutil.c index d8f51eedc..bf97eff6a 100644 --- a/hashutil.c +++ b/hashutil.c @@ -65,6 +65,7 @@ void hash_include_file_string( goto end; } switch (*p) { + /* Potential start of comment. */ case '/': if (p+1 == end) { break; @@ -101,6 +102,7 @@ void hash_include_file_string( } break; + /* Start of string. */ case '"': HASH(*p); p++;