From: Jean Delvare Date: Sun, 6 May 2007 21:51:54 +0000 (-0700) Subject: xtensa: strlcpy is smart enough X-Git-Tag: v2.6.22-rc1~831 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0ddb16cfb05c04d644b4ba8e36e780b15f47a191;p=linux-2.6-omap-h63xx.git xtensa: strlcpy is smart enough 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 Cc: Chris Zankel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c index ab05bff4010..4bfe333be22 100644 --- 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 "