On 12 Feb 2011, at 20:22, Philippe Roussel wrote:

> Hi,
> 
> Are these kind of patches considered useful ?

Yes, definitely.  

> Documentation says memmove should be used when the memory areas overlap
> and valgrind warns about it.

The patch looks right, but I'll let Richard check it before committing...

David

> Philippe
> 
> 
> Index: base/Source/NSPointerArray.m
> ===================================================================
> --- base/Source/NSPointerArray.m      (révision 32115)
> +++ base/Source/NSPointerArray.m      (copie de travail)
> @@ -281,7 +281,7 @@
>           }
>         if (i < _count - 1)
>           {
> -           memcpy(_contents + j, _contents + i + 1,
> +           memmove(_contents + j, _contents + i + 1,
>               (_count - i) * sizeof(void*));
>           }
>         _count = i = j;
> 
> 
> 
> _______________________________________________
> Gnustep-dev mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/gnustep-dev

--
This email complies with ISO 3103


_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to