Re: [PATCH/RFC v2 08/16] Make in-memory format aware of stat_crc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/05, Junio C Hamano wrote:
> Thomas Gummerer <t.gummerer@xxxxxxxxx> writes:
> 
> > +	stat_crc = crc32(stat_crc, (Bytef*)&stat, 4);
> > +	stat = htonl(ce->ce_ino);
> > +	stat_crc = crc32(stat_crc, (Bytef*)&stat, 4);
> > +	stat = htonl(ce->ce_size);
> > +	stat_crc = crc32(stat_crc, (Bytef*)&stat, 4);
> > +	stat = htonl(ce->ce_dev);
> > +	stat_crc = crc32(stat_crc, (Bytef*)&stat, 4);
> > +	stat = htonl(ce->ce_uid);
> > +	stat_crc = crc32(stat_crc, (Bytef*)&stat, 4);
> > +	stat = htonl(ce->ce_gid);
> > +	stat_crc = crc32(stat_crc, (Bytef*)&stat, 4);
> > +	return stat_crc;
> 
> What are these (Bytef *) casts are about?  We do not use it in any
> of our existing calls to crc32().

>From a quick look over the existing calls, their argument is
always either a void* or a char* pointer.  Using pointers other
than those two or Bytef* gives compiler warnings.  I can cast
to either void* or char* if that's preferred.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]