Skip to content

Commit

Permalink
cache.h: rename cache_def_free to cache_def_clear
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Karsten Blees authored and Junio C Hamano committed Jul 13, 2014
1 parent e7c7305 commit 2a60839
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion preload-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2a60839

Please sign in to comment.