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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: zap dead variable in got.c:add_branch()
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Tue, 10 Jan 2023 13:04:22 +0100

Download raw body.

Thread
On Tue, Jan 10, 2023 at 10:58:56PM +1100, Mark Jamsek wrote:
> As per the subject, this looks like a holdover no longer being used.

ok stsp

> diff 75b17c2a7d14fc0476cba0375a5a031cf0c13a00 refs/heads/main
> commit - 75b17c2a7d14fc0476cba0375a5a031cf0c13a00
> commit + 14048173ff560be5e9c163faf15d37e2130ef00a
> blob - 7f294d2ed40076ca1dedf56ff7581a9d161936e6
> blob + 5e95ca3316302472e74abae334031fd6835220aa
> --- got/got.c
> +++ got/got.c
> @@ -6800,7 +6800,7 @@ add_branch(struct got_repository *repo, const char *br
>  {
>  	const struct got_error *err = NULL;
>  	struct got_reference *ref = NULL;
> -	char *base_refname = NULL, *refname = NULL;
> +	char *refname = NULL;
>  
>  	/*
>  	 * Don't let the user create a branch name with a leading '-'.
> @@ -6833,7 +6833,6 @@ done:
>  done:
>  	if (ref)
>  		got_ref_close(ref);
> -	free(base_refname);
>  	free(refname);
>  	return err;
>  }
> 
> -- 
> Mark Jamsek <fnc.bsdbox.org>
> GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68