All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 03/10] strlcpy is smart enough
@ 2007-03-27  5:47 akpm
  2007-03-29 12:19 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-03-27  5:47 UTC (permalink / raw)
  To: jeff; +Cc: netdev, akpm, khali, osstklei, themann

From: Jean Delvare <khali@linux-fr.org>

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 <khali@linux-fr.org>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Cc: Thomas Klein <osstklei@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/ehea/ehea_ethtool.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/net/ehea/ehea_ethtool.c~ehea-strlcpy-is-smart-enough drivers/net/ehea/ehea_ethtool.c
--- a/drivers/net/ehea/ehea_ethtool.c~ehea-strlcpy-is-smart-enough
+++ a/drivers/net/ehea/ehea_ethtool.c
@@ -144,8 +144,8 @@ static int ehea_nway_reset(struct net_de
 static void ehea_get_drvinfo(struct net_device *dev,
 			       struct ethtool_drvinfo *info)
 {
-	strlcpy(info->driver, DRV_NAME, sizeof(info->driver) - 1);
-	strlcpy(info->version, DRV_VERSION, sizeof(info->version) - 1);
+	strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+	strlcpy(info->version, DRV_VERSION, sizeof(info->version));
 }
 
 static u32 ehea_get_msglevel(struct net_device *dev)
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 03/10] strlcpy is smart enough
  2007-03-27  5:47 [patch 03/10] strlcpy is smart enough akpm
@ 2007-03-29 12:19 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-03-29 12:19 UTC (permalink / raw)
  To: akpm; +Cc: netdev, khali, osstklei, themann

akpm@linux-foundation.org wrote:
> From: Jean Delvare <khali@linux-fr.org>
> 
> 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 <khali@linux-fr.org>
> Cc: Jan-Bernd Themann <themann@de.ibm.com>
> Cc: Thomas Klein <osstklei@de.ibm.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  drivers/net/ehea/ehea_ethtool.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

applied 3-5



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-29 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27  5:47 [patch 03/10] strlcpy is smart enough akpm
2007-03-29 12:19 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.