All of lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 1/2] nvme-cli wdc plugin: Add get pfail dump command.
Date: Wed, 24 Oct 2018 15:51:38 -0600	[thread overview]
Message-ID: <20181024215137.GA5138@localhost.localdomain> (raw)
In-Reply-To: <SN1PR04MB198440725CBB35D5EAAF94A4EAF60@SN1PR04MB1984.namprd04.prod.outlook.com>

On Wed, Oct 24, 2018@09:42:28PM +0000, Jeffrey Lien wrote:
> Yea, the intent is to copy 11 bytes into the string.  The zero byte/space is not needed so memcpy is probably the better solution.  

No, look again. The string terminator most certainly is needed the way
you're using it. It happened to work out since you've initialized the
temporary character array to all 0's, but there was no reason to even
allocate 4k stack space to hold a copy of that string instead of using
the pointing a 'const char *' directly to the literal.

  reply	other threads:[~2018-10-24 21:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 21:06 [PATCH 1/2] nvme-cli wdc plugin: Add get pfail dump command Dong Ho
2018-10-18 21:06 ` [PATCH 2/2] nvme-cli wdc plugin: Add documentation for pfail dump Dong Ho
2018-10-19 17:17 ` [PATCH 1/2] nvme-cli wdc plugin: Add get pfail dump command Keith Busch
2018-10-24 16:10   ` Eyal BenDavid
2018-10-24 16:22     ` Keith Busch
2018-10-24 16:28       ` Eyal BenDavid
2018-10-24 21:42         ` Jeffrey Lien
2018-10-24 21:51           ` Keith Busch [this message]
2018-10-24 22:19             ` Chaitanya Kulkarni
2018-10-25 15:58               ` Jeffrey Lien
2018-10-25 16:00                 ` Keith Busch
2018-10-25 17:25                   ` Jeffrey Lien
2018-10-25 17:28                   ` Jeffrey Lien
2018-10-25 17:47                   ` Jeffrey Lien
2018-10-25 18:02                     ` 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=20181024215137.GA5138@localhost.localdomain \
    --to=keith.busch@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.