[SUNRPC]: more sunrpc endianness annotations
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 27 Sep 2006 05:30:23 +0000 (22:30 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 29 Sep 2006 01:01:22 +0000 (18:01 -0700)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sunrpc/auth_gss/svcauth_gss.c
net/sunrpc/svcauth_unix.c

index a2587e8eef7bb2d1dbbcb16222fb717cd56a7295..638c0b576203bab4fac5c0037cf1881e2c1c32e3 100644 (file)
@@ -620,7 +620,7 @@ svc_safe_getnetobj(struct kvec *argv, struct xdr_netobj *o)
 static inline int
 svc_safe_putnetobj(struct kvec *resv, struct xdr_netobj *o)
 {
-       u32 *p;
+       u8 *p;
 
        if (resv->iov_len + 4 > PAGE_SIZE)
                return -1;
@@ -630,7 +630,7 @@ svc_safe_putnetobj(struct kvec *resv, struct xdr_netobj *o)
        if (resv->iov_len > PAGE_SIZE)
                return -1;
        memcpy(p, o->data, o->len);
-       memset((u8 *)p + o->len, 0, round_up_to_quad(o->len) - o->len);
+       memset(p + o->len, 0, round_up_to_quad(o->len) - o->len);
        return 0;
 }
 
@@ -1219,8 +1219,8 @@ svcauth_gss_wrap_resp_priv(struct svc_rqst *rqstp)
        struct rpc_gss_wire_cred *gc = &gsd->clcred;
        struct xdr_buf *resbuf = &rqstp->rq_res;
        struct page **inpages = NULL;
-       __be32 *p;
-       int offset, *len;
+       __be32 *p, *len;
+       int offset;
        int pad;
 
        p = gsd->body_start;
index f98229fb5e109a39d9780cfd081fc73a5a5301fb..1020d54b01d074a7fd8c1d25976a7d9fe800935c 100644 (file)
@@ -249,10 +249,10 @@ static int ip_map_show(struct seq_file *m,
 
        seq_printf(m, "%s %d.%d.%d.%d %s\n",
                   im->m_class,
-                  htonl(addr.s_addr) >> 24 & 0xff,
-                  htonl(addr.s_addr) >> 16 & 0xff,
-                  htonl(addr.s_addr) >>  8 & 0xff,
-                  htonl(addr.s_addr) >>  0 & 0xff,
+                  ntohl(addr.s_addr) >> 24 & 0xff,
+                  ntohl(addr.s_addr) >> 16 & 0xff,
+                  ntohl(addr.s_addr) >>  8 & 0xff,
+                  ntohl(addr.s_addr) >>  0 & 0xff,
                   dom
                   );
        return 0;