Re: [PATCH 2/2] Use fixed-size integers for .idx file I/O
- From
- Morten Welinder <mwelinder@gmail.com>
- Date
- Jan 18, 2007, 14:51 UTC
- Message-ID
- <118833cc0701180651w3b5ac164m4e396399f1d58cb7@mail.gmail.com>
- In-Reply-To
- <7vd55col04.fsf@assigned-by-dhcp.cox.net>
> - return ntohl(*((unsigned int *) ((char *) index + (24 * mi)))); > + return ntohl(*((uint32_t *)((char *)index + (24 * mi))));
Is that pointer gymnastics guaranteed to work? I.e., how do we know that we can access an uint32_t (or unsigned) at such an address?
M.