Ferenc Rakoczi wrote:
> One general comment: you assume that little endian
> implies no alignment requirement for multiple byte loads.
> While this is true for the architectures we care about
> the most (x86 and amd64 and sparc),
> I think the code would be much cleaner if the
> #ifdef _LITTLE_ENDIAN     lines were replaced by
> #if defined(__i386) || defined(__amd64)
> where that assumption is made. 

I added this code:
#if defined(__i386) || defined(__amd64)
#include <sys/byteorder.h>
#define UNALIGNED_POINTERS_PERMITTED
#endif

and used UNALIGNED_POINTERS_PERMIT instead of _LITTLE_ENDIAN where it applies.

> I also noticed a cut&past&edit error:
> dca_3des.c :
> 697                 des_ctx->dr_ctx.iv[0] = htonl(param[0]);
> 698                 des_ctx->dr_ctx.iv[1] = htonl(param[0]);
> In the second line it should be param[1]. 

Fixed.

Dina wrote:
> And only one nit from me:
> ikeadm.c, 1150: A run-on sentence replaced with a shorter one and
>     a fragment.  If it were me, I'd discombobulate it this way:
>   "Localization for ikeadm seems more straightforward when complete
>   phrases are translated rather than a part of a phrase, a call to
>   dump_foo(), and more of the phrase.  It could also accommodate
>   non-English grammar more easily." 

Fixed as you suggested.

I updated the webrev here:
http://dan.drydog.com/reviews/5007142-bswap/

--
This message posted from opensolaris.org

Reply via email to