Hi,

When looking around in the kernel code, I ran into this (hash.h):

u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length);

[...]

static inline u64 btrfs_extref_hash(u64 parent_objectid, const char *name,
int len)
{
return (u64) btrfs_crc32c(parent_objectid, name, len);
}

[...]

What is the "official" behaviour of just stuffing a 64-bit
(parent_objectid) value into a 32-bit function argument (crc)? Does it
get truncated? Does this compile without a warning?

I would expect that the caller should do the housekeeping of deciding
how to transform the 64 bit parent_objectid into some 32 bit value.

-- 
Hans van Kranenburg
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to