"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: Commit e600f1246e15 breaks test_update_conflict_wt_rm_vs_repo_rm on FreeBSD
To:
gameoftrees@openbsd.org
Date:
Tue, 23 Mar 2021 15:50:51 +0100

Download raw body.

Thread
Stefan Sperling:

> I would propose this fix. Callers expect get_file_status() to populate
> struct sb in all cases, so it might as well initialize it on entry.

ok

> --- lib/worktree.c
> +++ lib/worktree.c
> @@ -1731,6 +1731,7 @@ get_file_status(unsigned char *status, struct stat *sb
>  	unsigned char staged_status = get_staged_status(ie);
>  
>  	*status = GOT_STATUS_NO_CHANGE;
> +	memset(sb, 0, sizeof(*sb));
>  
>  	/*
>  	 * Whenever the caller provides a directory descriptor and a

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de