diff options
author | Simon Glass <sjg@chromium.org> | 2020-02-03 07:35:57 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-02-05 19:33:46 -0700 |
commit | cf23c7c1dd11ca8f47bb7146c72729efc81eafd0 (patch) | |
tree | 791fbeb92fc1905c1280cc5972eed22ae972008f /arch/sandbox/cpu | |
parent | 8d38a8459b0de45f5ff41f3e11c278a5cf395fd0 (diff) |
sandbox: Rename 'free' variable
This name conflicts with our desire to #define free() to something else on
sandbox. Rename it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r-- | arch/sandbox/cpu/state.c | 6 |
1 files 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; |