This is safe since KG_TOK_MIC_MSG and SEAL_ALG_NONE are both endian palindromes. I'm also making the assumption that the signalg field really should be in little-endian. That looks odd, but looking at the spec I guess it's correct. Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxxxxxxx> --- net/sunrpc/auth_gss/gss_krb5_seal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c index 62ae3273186c..94ad57ff7169 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seal.c +++ b/net/sunrpc/auth_gss/gss_krb5_seal.c @@ -83,10 +83,10 @@ setup_token(struct krb5_ctx *ctx, struct xdr_netobj *token) /* ptr now at start of header described in rfc 1964, section 1.2.1: */ krb5_hdr = ptr; - *ptr++ = KG_TOK_MIC_MSG; - *ptr++ = cpu_to_le16(ctx->gk5e->signalg); - *ptr++ = SEAL_ALG_NONE; - *ptr++ = 0xffff; + *ptr++ = cpu_to_be16(KG_TOK_MIC_MSG); + *ptr++ = (__force __be16)cpu_to_le16(ctx->gk5e->signalg); + *ptr++ = cpu_to_be16(SEAL_ALG_NONE); + *ptr++ = cpu_to_be16(0xffff); return (char *)krb5_hdr; } -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html