projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee17b36
)
xtensa: strlcpy is smart enough
author
Jean Delvare
<
[email protected]
>
Sun, 6 May 2007 21:51:54 +0000
(14:51 -0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 7 May 2007 19:13:04 +0000
(12:13 -0700)
strlcpy already accounts for the trailing zero in its length
computation, so there is no need to substract one to the buffer size.
Signed-off-by: Jean Delvare <
[email protected]
>
Cc: Chris Zankel <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/xtensa/platform-iss/network.c
patch
|
blob
|
history
diff --git
a/arch/xtensa/platform-iss/network.c
b/arch/xtensa/platform-iss/network.c
index ab05bff40104c80ac2849131b57213a9aa898b5a..4bfe333be22943558a8448679b71f4bcd2b273e8 100644
(file)
--- a/
arch/xtensa/platform-iss/network.c
+++ b/
arch/xtensa/platform-iss/network.c
@@
-251,7
+251,7
@@
static int tuntap_open(struct iss_net_private *lp)
memset(&ifr, 0, sizeof ifr);
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
- strlcpy(ifr.ifr_name, dev_name, sizeof ifr.ifr_name
- 1
);
+ strlcpy(ifr.ifr_name, dev_name, sizeof ifr.ifr_name);
if ((err = simc_ioctl(fd, TUNSETIFF, (void*) &ifr)) < 0) {
printk("Failed to set interface, returned %d "