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

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: zap unused var
To:
Mark Jamsek <mark@jamsek.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 28 Jul 2023 09:04:29 +0200

Download raw body.

Thread
  • Mark Jamsek:

    zap unused var

    • Omar Polo:

      zap unused var

On 2023/07/28 16:09:16 +1000, Mark Jamsek <mark@jamsek.com> wrote:
> Spotted by chance; 'commit' isn't used in this function.

nice catch :)

ok op@

> diff /home/mark/src/got
> commit - 1f5993e02a319fbcf02f9dbcd2926397fc7b3462
> path + /home/mark/src/got
> blob - 72eb97a7e23d5f426a1660337c93deb7704985ad
> file + got/got.c
> --- got/got.c
> +++ got/got.c
> @@ -12199,7 +12199,6 @@ histedit_save_list(struct got_histedit_list *histedit_
>  	char *path = NULL;
>  	FILE *f = NULL;
>  	struct got_histedit_list_entry *hle;
> -	struct got_commit_object *commit = NULL;
>  
>  	err = got_worktree_get_histedit_script_path(&path, worktree);
>  	if (err)
> @@ -12229,8 +12228,6 @@ done:
>  	if (f && fclose(f) == EOF && err == NULL)
>  		err = got_error_from_errno("fclose");
>  	free(path);
> -	if (commit)
> -		got_object_commit_close(commit);
>  	return err;
>  }
>