~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_format.cc

  • Committer: Kristian Nielsen
  • Date: 2008-11-29 08:46:32 UTC
  • mto: (632.1.2 devel)
  • mto: This revision was merged to the branch mainline in revision 634.
  • Revision ID: knielsen@odin-20081129084632-1n5czk0pvf14qbk0
Take Mats'es changes from bmove()->memcpy(), and fix all of them to be
memmove() instead. I checked several of them, all of which were wrong
(due to potentially overlapping source and destination), so most
likely more of them are wrong. Painstakingly checking all of them for
whether memcpy() could be used instead would be a very big and
errorprone task, and really is not worth it.

Fixes a bunch of Valgrind errors in the test suite as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
  {
86
86
    if (to == startpos)
87
87
    {
88
 
      memcpy(buff, name, length); /* Save name for last copy */
 
88
      memmove(buff, name, length); /* Save name for last copy */
89
89
      name=buff;
90
90
    }
91
91
    pos=strmake(my_stpcpy(to,dev),name,length);