Init array to -1 with memset()?

Wayne Davison wayned at samba.org
Tue Jan 27 17:55:48 GMT 2004


On Tue, Jan 27, 2004 at 12:47:28PM -0500, Carson Gaspar wrote:
> a[0] = -1;
> memset((void *)&a[1], a[0], 99);
> 
> Or just pass a -1 to memset...

The array elements aren't a single byte long, but memset() does its
thing in byte-sized chunks.

..wayne..


More information about the rsync mailing list