xdr: fix two old FIXMEs related to signed/unsigned arithmetic
[openafs.git] / src / rx / xdr.c
index 884627e..2639de3 100644 (file)
@@ -509,9 +509,8 @@ xdr_string(XDR * xdrs, char **cpp, u_int maxsize)
     u_int size;
     u_int nodesize;
 
-    /* FIXME: this does not look correct: MSVC 6 computes -2 here */
-    if (maxsize > ((~0) >> 1) - 1)
-       maxsize = ((~0) >> 1) - 1;
+    if (maxsize > ((~0u) >> 1) - 1)
+       maxsize = ((~0u) >> 1) - 1;
 
     /*
      * first deal with the length since xdr strings are counted-strings