3 ms·
> Isn't the 'modern' solution to memcpy into a temp and swap the bytes in that? Or just use the endian.h / sys/endian.h routines, which do the right thing (be3
by loeg 6y ago
> Isn't the 'modern' solution to memcpy into a temp and swap the bytes in that?
Or just use the endian.h / sys/endian.h routines, which do the right thing (be32dec / be32enc / whatever). memcpy+swap is fine, and easier to get right than the author's giant expressions, but you might as well use the named routines that do exactly what you want already.