From b819a00b06be3dd42e88b0c7fddfc4edd87bcc45 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Wed, 9 Aug 2023 12:02:07 -0700 Subject: [PATCH] storage: rename shadow variables Rename shadow variables found by -Wshadow. Signed-off-by: Daniel Leung --- subsys/storage/stream/stream_flash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subsys/storage/stream/stream_flash.c b/subsys/storage/stream/stream_flash.c index 886bb31d59b..282b58f1eb9 100644 --- a/subsys/storage/stream/stream_flash.c +++ b/subsys/storage/stream/stream_flash.c @@ -28,12 +28,12 @@ static int settings_direct_loader(const char *key, size_t len, /* Handle the subtree if it is an exact key match. */ if (settings_name_next(key, NULL) == 0) { size_t bytes_written = 0; - ssize_t len = read_cb(cb_arg, &bytes_written, + ssize_t cb_len = read_cb(cb_arg, &bytes_written, sizeof(bytes_written)); - if (len != sizeof(ctx->bytes_written)) { + if (cb_len != sizeof(ctx->bytes_written)) { LOG_ERR("Unable to read bytes_written from storage"); - return len; + return cb_len; } /* Check that loaded progress is not outdated. */