linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Drokin <green@namesys.com>
To: Ben Collins <bcollins@debian.org>
Cc: jdike@karaya.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch/* strlcpy conversion
Date: Tue, 27 May 2003 17:27:27 +0400	[thread overview]
Message-ID: <20030527132727.GA6622@namesys.com> (raw)
In-Reply-To: <20030526023850.GO2657@phunnypharm.org>

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

      reply	other threads:[~2003-05-27 13:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-26  2:38 [PATCH] arch/* strlcpy conversion Ben Collins
2003-05-27 13:27 ` Oleg Drokin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030527132727.GA6622@namesys.com \
    --to=green@namesys.com \
    --cc=bcollins@debian.org \
    --cc=jdike@karaya.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).