In this particular case I don't see a real benefit for seperating the for loops, perhaps the author thought it to be easier to read? However, if there comes a time when Bstruct.aa/Btable.aa has a different number of entries than Bstruct.bb/Btable.bb then this would be easier IMO to maintain.
The key is "embedded". Some CPUs, many in the embedded space, throw exceptions for misaligned data access EXCEPT for byte access. This is one way to copy data with unknown alignment (say from a socket or file) to an aligned data structure. (The original ARM chips would throw an exception, which some embedded OSs would catch and then do exactly the above internally.)
Last Visit: 31-Dec-99 18:00 Last Update: 28-Jul-15 13:24