DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: [dpdk-dev] replacing snprintf with strlcpy where possible
Date: Fri, 8 Mar 2019 16:48:51 -0800	[thread overview]
Message-ID: <20190308164851.46fe24b6@shemminger-XPS-13-9360> (raw)

If someone is familiar with coccinelle it should be possible to replace
all uses of:
	snprintf(buf, sizeof(buf), "%s", foo);
with:
	strlcpy(buf, foo, sizeof(buf));
using semantic patch

$ git grep snprintf | grep '"%s"' | grep -v ' = ' | wc -l
114

This could go on the cleanup dpdk-newbies list if there was one.

                 reply	other threads:[~2019-03-09  0:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190308164851.46fe24b6@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).