Re: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

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

 



Am 16.05.2017 um 19:17 schrieb Ben Peart:
OK, now I'm confused as to the best path for adding a get_be64. This one is trivial:

#define get_be64(p)    ntohll(*(uint64_t *)(p))

I cringe when I see a cast like this. Unless you can guarantee that p is char* (bare or signed or unsigned), you fall pray to strict aliasing violations, aka undefined behavior. And I'm not even mentioning correct alignment, yet.

-- Hannes



[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]