From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH] nvme-cli: adjust memset size for data buffer in submit_io
Date: Tue, 3 Jul 2018 22:18:59 +0900 [thread overview]
Message-ID: <1530623939-12790-1-git-send-email-minwoo.im.dev@gmail.com> (raw)
Adjust size of memset() for the data buffer to its own size.
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nvme.c b/nvme.c
index e2f8752..039997a 100644
--- a/nvme.c
+++ b/nvme.c
@@ -3942,7 +3942,7 @@ static int submit_io(int opcode, char *command, const char *desc,
err = ENOMEM;
goto close_mfd;
}
- memset(buffer, 0, cfg.data_size);
+ memset(buffer, 0, buffer_size);
if (cfg.metadata_size) {
mbuffer = malloc(cfg.metadata_size);
--
2.7.4
next reply other threads:[~2018-07-03 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 13:18 Minwoo Im [this message]
2018-07-03 14:25 ` [PATCH] nvme-cli: adjust memset size for data buffer in submit_io Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530623939-12790-1-git-send-email-minwoo.im.dev@gmail.com \
--to=minwoo.im.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox