git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
app/compress-perf: improve results report
[dpdk.git]
/
examples
/
exception_path
/
main.c
diff --git
a/examples/exception_path/main.c
b/examples/exception_path/main.c
index
8f37f5f
..
0d79e5a
100644
(file)
--- a/
examples/exception_path/main.c
+++ b/
examples/exception_path/main.c
@@
-176,7
+176,7
@@
static int tap_create(char *name)
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
if (name && *name)
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
if (name && *name)
- s
nprintf(ifr.ifr_name, IFNAMSIZ, "%s", name
);
+ s
trlcpy(ifr.ifr_name, name, IFNAMSIZ
);
ret = ioctl(fd, TUNSETIFF, (void *) &ifr);
if (ret < 0) {
ret = ioctl(fd, TUNSETIFF, (void *) &ifr);
if (ret < 0) {
@@
-185,7
+185,7
@@
static int tap_create(char *name)
}
if (name)
}
if (name)
- s
nprintf(name, IFNAMSIZ, "%s", ifr.ifr_name
);
+ s
trlcpy(name, ifr.ifr_name, IFNAMSIZ
);
return fd;
}
return fd;
}