DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
To: "pallantlax.poornima@intel.com" <pallantlax.poornima@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "liang.j.ma@intel.com" <liang.j.ma@intel.com>,
	"reshma.pattan@intel.com" <reshma.pattan@intel.com>,
	"peter.mccarthy@intel.com" <peter.mccarthy@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] event/opdl: fix sprintf with snprintf
Date: Tue, 12 Mar 2019 08:39:25 +0000	[thread overview]
Message-ID: <18bf06c261696f4e0daa5e4a6de78da5f7e4d9ce.camel@marvell.com> (raw)
In-Reply-To: <c334890723acde6dd64a9ea766f9d65c931bed3c.camel@marvell.com>

On Mon, 2019-03-11 at 13:52 +0000, Jerin Jacob Kollanukkaran wrote:
> On Mon, 2019-03-11 at 06:51 +0000, Jerin Jacob Kollanukkaran wrote:
> > On Mon, 2019-02-04 at 07:18 +0000, Pallantla Poornima wrote:
> > > %'16"PRIu64" %s "
> > > diff --git a/drivers/event/opdl/opdl_evdev_xstats.c
> > > b/drivers/event/opdl/opdl_evdev_xstats.c
> > > index 0e6c6bd5e..27b3d8802 100644
> > > --- a/drivers/event/opdl/opdl_evdev_xstats.c
> > > +++ b/drivers/event/opdl/opdl_evdev_xstats.c
> > > @@ -32,10 +32,9 @@ opdl_xstats_init(struct rte_eventdev *dev)
> > >  			uint32_t index = (i * max_num_port_xstat) + j;
> > >  
> > >  			/* Name */
> > > -			sprintf(device->port_xstat[index].stat.name,
> > > -			       "port_%02u_%s",
> > > -			       i,
> > > -			       port_xstat_str[j]);
> > > +			snprintf(device->port_xstat[index].stat.name,
> > > +				sizeof(device-
> > > > port_xstat[index].stat.name),
> > 
> > Same as above. Use RTE_EVENT_DEV_XSTATS_NAME_SIZE for size.
> 
> I overlooked the code. This code looks good to me.
> If there is no comment from Liang Ma then i will merge this patch as
> is.


Applied to dpdk-next-eventdev/master. Thanks.


> 

      reply	other threads:[~2019-03-12  8:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04  7:18 Pallantla Poornima
2019-03-11  6:51 ` Jerin Jacob Kollanukkaran
2019-03-11 13:52   ` Jerin Jacob Kollanukkaran
2019-03-12  8:39     ` Jerin Jacob Kollanukkaran [this message]

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=18bf06c261696f4e0daa5e4a6de78da5f7e4d9ce.camel@marvell.com \
    --to=jerinj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=liang.j.ma@intel.com \
    --cc=pallantlax.poornima@intel.com \
    --cc=peter.mccarthy@intel.com \
    --cc=reshma.pattan@intel.com \
    --cc=stable@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).