introduce CHECKOUT_INIT

Add a static initializer for struct checkout and use it throughout the
code base.  It's shorter, avoids a memset(3) call and makes sure the
base_dir member is initialized to a valid (empty) string.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe
2016-09-22 18:11:33 +02:00
committed by Junio C Hamano
parent 6fe1b1407e
commit 68e3d6292f
5 changed files with 5 additions and 9 deletions

View File

@ -1354,6 +1354,7 @@ struct checkout {
not_new:1,
refresh_cache:1;
};
#define CHECKOUT_INIT { NULL, "" }
#define TEMPORARY_FILENAME_LENGTH 25
extern int checkout_entry(struct cache_entry *ce, const struct checkout *state, char *topath);