]> git.proxmox.com Git - mirror_spl.git/commitdiff
Minor bug fix in XDR code introduced in last minute change before landing.
authorRicardo M. Correia <Ricardo.M.Correia@Sun.COM>
Wed, 11 Mar 2009 05:39:03 +0000 (05:39 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 11 Mar 2009 23:27:35 +0000 (16:27 -0700)
1) Removed xdr_bytesrec typedef which has no consumers.  If we re-add
   it should also probably be xdr_bytesrec_t.

include/rpc/xdr.h
module/spl/spl-xdr.c

index 5b816546064830e82db76bccadc5c2a9fa348ad1..43919ca2572f51ebd718074cc159c68c3469d324 100644 (file)
@@ -68,8 +68,6 @@ struct xdr_bytesrec {
        size_t xc_num_avail;
 };
 
-typedef struct xdr_bytesrec xdr_bytesrec;
-
 /*
  * XDR functions.
  */
index feaa59e4fae313c37773ef3344aeea5247c81059..16e42c336e3c135c3309b56cd6fbeceeefc234b6 100644 (file)
@@ -186,7 +186,7 @@ xdrmem_enc_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt)
        if (xdrs->x_addr > xdrs->x_addr_end)
                return FALSE;
 
-       if (xdrs->x_addr_end - xdrs->x_addr > size)
+       if (xdrs->x_addr_end - xdrs->x_addr < size)
                return FALSE;
 
        memcpy(xdrs->x_addr, cp, cnt);
@@ -215,7 +215,7 @@ xdrmem_dec_bytes(XDR *xdrs, caddr_t cp, const uint_t cnt)
        if (xdrs->x_addr > xdrs->x_addr_end)
                return FALSE;
 
-       if (xdrs->x_addr_end - xdrs->x_addr > size)
+       if (xdrs->x_addr_end - xdrs->x_addr < size)
                return FALSE;
 
        memcpy(cp, xdrs->x_addr, cnt);