Re: [PATCH 08/11] rebase: remove redundant strbuf
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Sep 9, 2021, 10:35 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2109091233330.59@tvgsbejvaqbjf.bet>
- In-Reply-To
- <35b6c26c8f934e3bac984014a59c095c15416c79.1631094563.git.gitgitgadget@gmail.com>
Hi Phillip,
On Wed, 8 Sep 2021, Phillip Wood via GitGitGadget wrote:
Show 6 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk> > > There is already an strbuf that can be reused for creating messages. > msg is not freed if there is an error and there is a logic error where > we call strbuf_release(&msg) followed by strbuf_reset(&msg) and > strbuf_addf(&msg).
In some instances, we use a `buf` variable to construct a string that is then assigned to a `const char *` and is used elsewhere throughout the function. If this was the case in the code you modified, that would be a problem.
I did verify manually that this is not the case, though, so this patch is good to go.
Thanks, Dscho