X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fevent%2Fopdl%2Fopdl_evdev_xstats.c;h=27b3d88023114bbbcdef27223532e05e0cfabf8f;hb=5729407fa4d612b93ceefacef13f57c1de2ceaa6;hp=70b84d9e464d5d6570796358993aba7f4e132bf9;hpb=be455196d4bb64c4fc681eddf9d2bd6aef2d9bee;p=dpdk.git diff --git a/drivers/event/opdl/opdl_evdev_xstats.c b/drivers/event/opdl/opdl_evdev_xstats.c index 70b84d9e46..27b3d88023 100644 --- a/drivers/event/opdl/opdl_evdev_xstats.c +++ b/drivers/event/opdl/opdl_evdev_xstats.c @@ -1,6 +1,5 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2010-2014 Intel Corporation +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2017 Intel Corporation */ #include "opdl_evdev.h" @@ -33,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), + "port_%02u_%s", i, port_xstat_str[j]); /* ID */ device->port_xstat[index].id = index;