From patchwork Mon Feb 3 14:35:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 235844 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Mon, 3 Feb 2020 07:35:57 -0700 Subject: [PATCH v2 11/32] sandbox: Rename 'free' variable In-Reply-To: <20200203143618.74619-1-sjg@chromium.org> References: <20200203143618.74619-1-sjg@chromium.org> Message-ID: <20200203073614.v2.11.Ifb04203c2bf46c05eaf0015b1140a2ae4bb3e090@changeid> This name conflicts with our desire to #define free() to something else on sandbox. Rename it. Signed-off-by: Simon Glass --- Changes in v2: None arch/sandbox/cpu/state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index cd46e000f5..ef2e63f37a 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -16,14 +16,14 @@ static struct sandbox_state *state; /* Pointer to current state record */ static int state_ensure_space(int extra_size) { void *blob = state->state_fdt; - int used, size, free; + int used, size, free_bytes; void *buf; int ret; used = fdt_off_dt_strings(blob) + fdt_size_dt_strings(blob); size = fdt_totalsize(blob); - free = size - used; - if (free > extra_size) + free_bytes = size - used; + if (free_bytes > extra_size) return 0; size = used + extra_size;