cache.h: rename cache_def_free to cache_def_clear
authorKarsten Blees <karsten.blees@gmail.com>
Fri, 11 Jul 2014 23:02:34 +0000 (01:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Jul 2014 17:12:37 +0000 (10:12 -0700)
Rename cache_def_free to cache_def_clear as it doesn't free the struct
cache_def, but just clears its content.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
preload-index.c
diff --git a/cache.h b/cache.h
index b86eb84dbdb163543ec4c0dcf53860fe1d40d1ad..f505ffbcf4169c6fef59e31845a081453d6304aa 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -1074,7 +1074,7 @@ struct cache_def {
        int prefix_len_stat_func;
 };
 #define CACHE_DEF_INIT { STRBUF_INIT, 0, 0, 0 }
-static inline void cache_def_free(struct cache_def *cache)
+static inline void cache_def_clear(struct cache_def *cache)
 {
        strbuf_release(&cache->path);
 }
index 79ce8a998b0008f9182fa127b85d63feff4592d0..c1fe3a3ef9cba0c155d02475e24315784bd27ae4 100644 (file)
@@ -63,7 +63,7 @@ static void *preload_thread(void *_data)
                        continue;
                ce_mark_uptodate(ce);
        } while (--nr > 0);
-       cache_def_free(&cache);
+       cache_def_clear(&cache);
        return NULL;
 }