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:

committed by
Junio C Hamano

parent
6fe1b1407e
commit
68e3d6292f
@ -16,7 +16,7 @@ static int checkout_stage; /* default to checkout stage0 */
|
||||
static int to_tempfile;
|
||||
static char topath[4][TEMPORARY_FILENAME_LENGTH + 1];
|
||||
|
||||
static struct checkout state;
|
||||
static struct checkout state = CHECKOUT_INIT;
|
||||
|
||||
static void write_tempfile_record(const char *name, const char *prefix)
|
||||
{
|
||||
|
Reference in New Issue
Block a user