lkml.org 
[lkml]   [2003]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arch/* strlcpy conversion
Hello!

On Sun, May 25, 2003 at 10:38:50PM -0400, Ben Collins wrote:

> Index: linux-2.5/arch/um/os-Linux/drivers/tuntap_user.c
> ===================================================================
> --- linux-2.5/arch/um/os-Linux/drivers/tuntap_user.c (revision 10155)
> +++ linux-2.5/arch/um/os-Linux/drivers/tuntap_user.c (working copy)
> @@ -143,7 +143,7 @@
> }
> memset(&ifr, 0, sizeof(ifr));
> ifr.ifr_flags = IFF_TAP;
> - strncpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name) - 1);
> + strlcpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name));
> if(ioctl(pri->fd, TUNSETIFF, (void *) &ifr) < 0){
> printk("TUNSETIFF failed, errno = %d", errno);
> close(pri->fd);

This part is bogus.
the smth_user.c files in arch/um are files that are compiled against userspace headers,
there is no way tuntap_user.c can know anything about strlcpy().
Or at least the strlcpy() forward declaration should be added to avoid a warning.

Bye,
Oleg
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.020 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site