]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
This commit was generated by cvs2svn to compensate for changes in r519,
authorSam Hartman <hartmans@debian.org>
Sat, 3 Aug 2002 21:33:30 +0000 (21:33 +0000)
committerSam Hartman <hartmans@debian.org>
Sat, 3 Aug 2002 21:33:30 +0000 (21:33 +0000)
which included commits to RCS files with non-trunk default branches.

src/rx/xdr.c
src/rx/xdr_array.c
src/rx/xdr_arrayn.c

index 44d6421d6df2ae26473ea855726c97670a3b7e5d..8775d4e05df2e4f50d13abb3b3cea8081bc50021 100644 (file)
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#ifndef        NeXT
-#ifndef lint
-static char sccsid[] = "@(#)xdr.c 1.1 86/02/03 Copyr 1984 Sun Micro";
+
+#include <afsconfig.h>
+#ifdef KERNEL
+#include "../afs/param.h"
+#else
+#include <afs/param.h>
 #endif
 
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/xdr.c,v 1.1.1.3.2.1 2002/08/03 21:33:30 hartmans Exp $");
+
 /*
  * xdr.c, Generic XDR routines implementation.
  *
@@ -41,8 +46,9 @@ static char sccsid[] = "@(#)xdr.c 1.1 86/02/03 Copyr 1984 Sun Micro";
  * xdr.
  */
 
+#ifndef        NeXT
+
 #ifdef KERNEL
-#include "../afs/param.h"
 #include <sys/param.h>
 #ifndef AFS_LINUX20_ENV
 #include <sys/systm.h>
@@ -550,6 +556,8 @@ xdr_string(xdrs, cpp, maxsize)
        u_int size;
        u_int nodesize;
 
+        if (maxsize > ((~0) >> 1) - 1) maxsize = ((~0) >> 1) - 1;
+
        /*
         * first deal with the length since xdr strings are counted-strings
         */
index 2d5bb9efcab60d38579e0a622dd0961dd3d63bc8..38f17307db0e763909b22802663baa81338a16d4 100644 (file)
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
+#include <afsconfig.h>
 #include <afs/param.h>
+
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/xdr_array.c,v 1.1.1.4.2.1 2002/08/03 21:33:30 hartmans Exp $");
+
 #ifndef        NeXT
-#ifndef lint
-static char sccsid[] = "@(#)xdr_array.c 1.1 86/02/03 Copyr 1984 Sun Micro";
-#endif
 
 /*
  * xdr_array.c, Generic XDR routines impelmentation.
@@ -45,7 +46,9 @@ static char sccsid[] = "@(#)xdr_array.c 1.1 86/02/03 Copyr 1984 Sun Micro";
 #include <sys/param.h>
 #ifdef AFS_LINUX20_ENV
 #include "../h/string.h"
+#if 0
 #define bzero(A,C) memset((A), 0, (C))
+#endif
 #else
 #include <sys/systm.h>
 #endif /* AFS_LINUX20_ENV */
@@ -81,7 +84,10 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
        register caddr_t target = *addrp;
        register u_int c;  /* the actual element count */
        register bool_t stat = TRUE;
-       register int nodesize;
+       register u_int nodesize;
+
+        i = ((~0) >> 1) / elsize;
+        if (maxsize > i) maxsize = i;
 
        /* like strings, arrays are really counted arrays */
        if (! xdr_u_int(xdrs, sizep)) {
@@ -106,7 +112,7 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
                        if (target == NULL) {
                                return (FALSE);
                        }
-                       bzero(target, (u_int)nodesize);
+                       memset(target, 0, (u_int)nodesize);
                        break;
 
                case XDR_FREE:
index a9c17510b99fb4d2b76213be844018c7a8c8d93a..1c38d49fe70fe361e3d2d42b141b754568e0adfe 100644 (file)
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
+#include <afsconfig.h>
 #include <afs/param.h>
+
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/xdr_arrayn.c,v 1.1.1.4.2.1 2002/08/03 21:33:30 hartmans Exp $");
+
 #if !defined(NeXT)
-#ifndef lint
-static char sccsid[] = "@(#)xdr_array.c 1.1 86/02/03 Copyr 1984 Sun Micro";
-#endif
 
 /*
  * xdr_array.c, Generic XDR routines impelmentation.
@@ -45,7 +46,9 @@ static char sccsid[] = "@(#)xdr_array.c 1.1 86/02/03 Copyr 1984 Sun Micro";
 #include <sys/param.h>
 #ifdef AFS_LINUX20_ENV
 #include "../h/string.h"
+#if 0
 #define bzero(A,C) memset((A), 0, (C))
+#endif
 #else
 #include <sys/systm.h>
 #endif
@@ -86,7 +89,10 @@ bool_t xdr_arrayN(xdrs, addrp, sizep, maxsize, elsize, elproc)
        register caddr_t target = *addrp;
        register u_int c;  /* the actual element count */
        register bool_t stat = TRUE;
-       register int nodesize;
+       register u_int nodesize;
+
+        i = ((~0) >> 1) / elsize;
+        if (maxsize > i) maxsize = i;
 
        /* like strings, arrays are really counted arrays */
        if (! xdr_u_int(xdrs, sizep)) {
@@ -111,7 +117,7 @@ bool_t xdr_arrayN(xdrs, addrp, sizep, maxsize, elsize, elproc)
                        if (target == NULL) {
                                return (FALSE);
                        }
-                       bzero(target, (u_int)nodesize);
+                       memset(target, 0, (u_int)nodesize);
                        break;
 
                case XDR_FREE: