DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] replacing snprintf with strlcpy where possible
@ 2019-03-09  0:48 Stephen Hemminger
  0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2019-03-09  0:48 UTC (permalink / raw)
  To: dev

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-09  0:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-09  0:48 [dpdk-dev] replacing snprintf with strlcpy where possible Stephen Hemminger

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).