From: Rusty Russell <rusty@rustcorp.com.au>
To: Paul P Komkoff Jr <i@stingr.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] Some useless cleanup
Date: Thu, 9 May 2002 22:36:50 +1000 [thread overview]
Message-ID: <20020509223650.2d7a9f6a.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20020509102841.GA1125@stingr.net>
On Thu, 9 May 2002 14:28:41 +0400
Paul P Komkoff Jr <i@stingr.net> wrote:
> Look at this very funny cleanup changeset for 2.4
> avaliable at linux-stingr.bkbits.net/comm
Um, why not simply:
static inline void set_name(struct task_struct *tsk, const char *name)
{
/* comm is always nul-terminated already */
strncpy(tsk->comm, name, sizeof(tsk->comm)-1);
}
Your implementation using snprintf is (wasteful and) dangerous,
Rusty.
--
there are those who do and those who hang on and you don't see too
many doers quoting their contemporaries. -- Larry McVoy
next prev parent reply other threads:[~2002-05-09 21:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-09 10:28 [RFC] Some useless cleanup Paul P Komkoff Jr
2002-05-09 12:36 ` Rusty Russell [this message]
2002-05-09 22:23 ` Erik Andersen
2002-05-10 8:20 ` Bernd Petrovitsch
2002-05-10 11:42 ` Oliver Xymoron
2002-05-12 12:09 ` Rusty Russell
2002-05-10 9:44 ` Paul P Komkoff Jr
2002-05-09 15:09 ` Denis Vlasenko
2002-05-09 11:33 ` Paul P Komkoff Jr
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=20020509223650.2d7a9f6a.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=i@stingr.net \
--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