linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [TRIVIAL] kstrdup
Date: Tue, 14 Jan 2003 00:15:31 -0500	[thread overview]
Message-ID: <200301140515.h0E5FVqZ005872@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Mon, 13 Jan 2003 23:15:14 EST." <20030114041514.GA4844@gtf.org>

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

On Mon, 13 Jan 2003 23:15:14 EST, Jeff Garzik said:
> But having said that -- see my mail to Rusty about storing the strlen()
> result and then calling memcpy().  It [purposefully] does not address
> the fact that the string may become stale data, because it's the job of
> a higher level to ensure that.  But it does make explicit a compiler
> temporary, and allows us to use the presumeably-faster memcpy().

5 second's thought and another shot of Cherry Coke and it suddenly dawns
on me that memcpy() addresses my concerns as well as strncpy(), and as you
noted is presumably faster as well (since it doesn't have to keep looking for
a terminating null).


[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

  reply	other threads:[~2003-01-14  5:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-14  1:55 [PATCH] [TRIVIAL] kstrdup Rusty Russell
2003-01-14  3:19 ` Jeff Garzik
2003-01-15  6:45   ` Rusty Russell
2003-01-14  3:28 ` Valdis.Kletnieks
2003-01-14  3:38   ` Jeff Garzik
2003-01-14  3:53     ` Valdis.Kletnieks
2003-01-14  4:15       ` Jeff Garzik
2003-01-14  5:15         ` Valdis.Kletnieks [this message]
2003-01-14 11:48 ` Olaf Dietsche
2003-01-15  6:55   ` Rusty Russell
2003-01-19 23:37 ` Pavel Machek
2003-01-22  2:04   ` Rusty Russell
2003-01-23 14:02     ` Pavel Machek
2003-01-23 14:21       ` Martin Mares
2003-01-23 14:44         ` Pavel Machek
2003-01-29  4:51       ` Rusty Russell

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=200301140515.h0E5FVqZ005872@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=jgarzik@pobox.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).