Re: [PATCH v2 08/37] apply: rename 'new' variables
- From
Stefan Beller <sbeller@google.com>
- Date
- Feb 14, 2018, 21:40 UTC
- Message-ID
- <CAGZ79kbaSmuju7Arc8FLPtHG0i5ivFeSX=i_x2uZUahQeNS+Dg@mail.gmail.com>
- In-Reply-To
- <20180214185959.221906-9-bmwill@google.com>
On Wed, Feb 14, 2018 at 10:59 AM, Brandon Williams <bmwill@google.com> wrote:
Show 18 quoted lines
> Rename C++ keyword in order to bring the codebase closer to being able
> to be compiled with a C++ compiler.
>
> Signed-off-by: Brandon Williams <bmwill@google.com>
> ---
> apply.c | 54 +++++++++++++++++++++++++++---------------------------
> 1 file changed, 27 insertions(+), 27 deletions(-)
>
> diff --git a/apply.c b/apply.c
> index 071f653c6..e9f34dceb 100644
> --- a/apply.c
> +++ b/apply.c
> @@ -2301,7 +2301,7 @@ static void update_pre_post_images(struct image *preimage,
> size_t len, size_t postlen)
> {
> int i, ctx, reduced;
> - char *new, *old, *fixed;
> + char *new_buf, *old_buf, *fixed;*_buf makes it sound like it could be a strbuf at first, but it is just a buffer. That is ok, as we take over a buffer from 'postimage->buf'. I was suggesting a new name, but given that reuse of "buf", I guess this is fine.