X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fip_pipeline%2Ftap.c;h=adae640c1e6b4a3d11d2cbdd962cf54384bb1c2f;hb=3b307c55f2ac7f3f4146bd0dc9b474e1f3076f97;hp=11e4ad20e24f0a8092b5a492657f5e72db38e582;hpb=7959831b4d1b52f6525acb63ce0d94eeeb396855;p=dpdk.git diff --git a/examples/ip_pipeline/tap.c b/examples/ip_pipeline/tap.c index 11e4ad20e2..adae640c1e 100644 --- a/examples/ip_pipeline/tap.c +++ b/examples/ip_pipeline/tap.c @@ -3,7 +3,7 @@ */ #include -#ifdef RTE_EXEC_ENV_LINUXAPP +#ifdef RTE_EXEC_ENV_LINUX #include #include #endif @@ -46,7 +46,7 @@ tap_find(const char *name) return NULL; } -#ifndef RTE_EXEC_ENV_LINUXAPP +#ifndef RTE_EXEC_ENV_LINUX struct tap * tap_create(const char *name __rte_unused) @@ -75,7 +75,7 @@ tap_create(const char *name) memset(&ifr, 0, sizeof(ifr)); ifr.ifr_flags = IFF_TAP | IFF_NO_PI; /* No packet information */ - snprintf(ifr.ifr_name, IFNAMSIZ, "%s", name); + strlcpy(ifr.ifr_name, name, IFNAMSIZ); status = ioctl(fd, TUNSETIFF, (void *) &ifr); if (status < 0) {