cURL / Mailing Lists / curl-library / Single Mail

curl-library

re. 454561/ use of void*

From: Tor Arntsen <tor_at_spacetec.no>
Date: Wed, 4 Aug 2010 15:05:25 +0200

Re. 4545613
- bcopy(input, &context->buffer[bufindex], partLen);
+ memcpy((void *)&context->buffer[bufindex], (void *)input, partLen);

It shouldn't be necessary to cast to (void*) here, unless there are
systems out there where memcpy() isn't declared as 'void *memcpy (void
*s1, const void *s2, size_t n);'
Are there such systems? I imagine there could be some using char *,
but I haven't seen any. But then again I don't have any Windows
systems, for example.

-Tor
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-04