diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2023-09-25 08:05:05 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-09-29 10:07:20 +0200 |
commit | f193d0bde70e1be004cc4aba5aaf3ac9c459d156 (patch) | |
tree | f2e16c2a0f26faf8ae3ddb9dcc9abc9e0e6771c7 /hw | |
parent | 5567fa825ab9bdc4688308bea7816e2f969b65c3 (diff) | |
download | qemu-f193d0bde70e1be004cc4aba5aaf3ac9c459d156.zip qemu-f193d0bde70e1be004cc4aba5aaf3ac9c459d156.tar.gz qemu-f193d0bde70e1be004cc4aba5aaf3ac9c459d156.tar.bz2 |
hw/nvme: Clean up local variable shadowing in nvme_ns_init()
Fix local variable shadowing in nvme_ns_init().
Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Message-ID: <20230925-fix-local-shadowing-v1-1-3a1172132377@samsung.com>
Reviewed-by: Jesper Wendel Devantier <j.devantier@samsung.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/nvme/ns.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c index 44aba8f..0eabcf5 100644 --- a/hw/nvme/ns.c +++ b/hw/nvme/ns.c @@ -107,7 +107,7 @@ static int nvme_ns_init(NvmeNamespace *ns, Error **errp) ns->pif = ns->params.pif; - static const NvmeLBAF lbaf[16] = { + static const NvmeLBAF defaults[16] = { [0] = { .ds = 9 }, [1] = { .ds = 9, .ms = 8 }, [2] = { .ds = 9, .ms = 16 }, @@ -120,7 +120,7 @@ static int nvme_ns_init(NvmeNamespace *ns, Error **errp) ns->nlbaf = 8; - memcpy(&id_ns->lbaf, &lbaf, sizeof(lbaf)); + memcpy(&id_ns->lbaf, &defaults, sizeof(defaults)); for (i = 0; i < ns->nlbaf; i++) { NvmeLBAF *lbaf = &id_ns->lbaf[i]; |