On Dec 3, 2007, at 3:04, Tomash Brechko wrote:
Casting CAS to uint32_t is probably from the times when it was done so
in the mainline, you don't need it any more.
Yes, that is likely the case.
BTW, all this (uint64_t*), (int*) casts call for a BIG FAT WARNING
that we heavily depend on the fact that the address is properly
aligned for this type, i.e. dereferencing uint64_t* not aligned to 8
bytes would trap on some platforms.
Where would this be an issue? Would the compiler generate a
warning? Is it otherwise possible to test for correctness?
+#define MIN_BIN_PKT_LENGTH 12
...
+#define BIN_PKT_HDR_WORDS (MIN_BIN_PKT_LENGTH/sizeof(uint32_t))
Not really important, but by putting this the other way around you
would show that one thing is the exact multiple of the other:
What you said makes sense here (and I didn't even remember adding
_WORDS), but I don't care enough about this issue to want to go
through the effort of changing it.
--
Dustin Sallings