From 68e3d6292f27f123c072175748183c9cb9bc1c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Thu, 22 Sep 2016 18:11:33 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index d0494c853..5d9116c0c 100644 --- a/cache.h +++ b/cache.h @@ -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); -- cgit v1.2.1