Mailinglist Archive: opensuse-programming (51 mails)

< Previous Next >
Re: [suse-programming-e] should I use memmove instead of strcpy just to appease valgrind?
  • From: Jerry Feldman <gaf@xxxxxxx>
  • Date: Sun, 7 May 2006 19:33:23 -0400
  • Message-id: <20060507193323.4690d7e9@xxxxxxxxxxx>
On Sun, 07 May 2006 18:16:49 +0200
Per Jessen <per@xxxxxxxxxxxx> wrote:

> So would you use memmove() in the otherwise perfectly normal
> case of strcpy(a, a+2)? It still looks like overkill to me, but if the
> copying is not guaranted to be in order, well.
You are probably save, but not guaranteed.
--
Jerry Feldman <gaf@xxxxxxx>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
< Previous Next >