Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common get rid of caddr_t



details:   https://anonhg.NetBSD.org/src/rev/02150b462dca
branches:  trunk
changeset: 842090:02150b462dca
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jun 16 16:01:44 2019 +0000

description:
get rid of caddr_t

diffstat:

 common/include/rpc/types.h      |  4 +---
 common/include/rpc/xdr.h        |  4 ++--
 common/lib/libc/rpc/xdr.c       |  8 ++++----
 common/lib/libc/rpc/xdr_array.c |  8 ++++----
 4 files changed, 11 insertions(+), 13 deletions(-)

diffs (104 lines):

diff -r 8911bc9a674a -r 02150b462dca common/include/rpc/types.h
--- a/common/include/rpc/types.h        Sun Jun 16 15:16:15 2019 +0000
+++ b/common/include/rpc/types.h        Sun Jun 16 16:01:44 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.2 2019/06/05 16:25:43 hannken Exp $        */
+/*     $NetBSD: types.h,v 1.3 2019/06/16 16:01:44 christos Exp $       */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -66,8 +66,6 @@
 
 #define warn(msg,...) /**/
 
-typedef __caddr_t caddr_t;
-
 #include <sys/kmem.h>
 
 #define mem_alloc(bsize)       kmem_alloc(bsize, KM_SLEEP)
diff -r 8911bc9a674a -r 02150b462dca common/include/rpc/xdr.h
--- a/common/include/rpc/xdr.h  Sun Jun 16 15:16:15 2019 +0000
+++ b/common/include/rpc/xdr.h  Sun Jun 16 16:01:44 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xdr.h,v 1.1 2019/06/04 15:07:55 hannken Exp $  */
+/*     $NetBSD: xdr.h,v 1.2 2019/06/16 16:01:44 christos Exp $ */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -364,7 +364,7 @@
 
 /* true if no more input */
 extern bool_t xdrrec_eof(XDR *);
-extern unsigned xdrrec_readbytes(XDR *, caddr_t, unsigned int);
+extern unsigned xdrrec_readbytes(XDR *, char *, unsigned int);
 __END_DECLS
 
 #endif /* !_RPC_XDR_H_ */
diff -r 8911bc9a674a -r 02150b462dca common/lib/libc/rpc/xdr.c
--- a/common/lib/libc/rpc/xdr.c Sun Jun 16 15:16:15 2019 +0000
+++ b/common/lib/libc/rpc/xdr.c Sun Jun 16 16:01:44 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xdr.c,v 1.2 2019/06/05 16:25:43 hannken Exp $  */
+/*     $NetBSD: xdr.c,v 1.3 2019/06/16 16:01:44 christos Exp $ */
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -37,7 +37,7 @@
 static char *sccsid = "@(#)xdr.c 1.35 87/08/12";
 static char *sccsid = "@(#)xdr.c       2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: xdr.c,v 1.2 2019/06/05 16:25:43 hannken Exp $");
+__RCSID("$NetBSD: xdr.c,v 1.3 2019/06/16 16:01:44 christos Exp $");
 #endif
 #endif
 
@@ -546,7 +546,7 @@
  * cp points to the opaque object and cnt gives the byte length.
  */
 bool_t
-xdr_opaque(XDR *xdrs, caddr_t cp, u_int cnt)
+xdr_opaque(XDR *xdrs, char *cp, u_int cnt)
 {
        u_int rndup;
        static int crud[BYTES_PER_XDR_UNIT];
@@ -572,7 +572,7 @@
                }
                if (rndup == 0)
                        return (TRUE);
-               return (XDR_GETBYTES(xdrs, (caddr_t)(void *)crud, rndup));
+               return (XDR_GETBYTES(xdrs, (void *)crud, rndup));
        }
 
        if (xdrs->x_op == XDR_ENCODE) {
diff -r 8911bc9a674a -r 02150b462dca common/lib/libc/rpc/xdr_array.c
--- a/common/lib/libc/rpc/xdr_array.c   Sun Jun 16 15:16:15 2019 +0000
+++ b/common/lib/libc/rpc/xdr_array.c   Sun Jun 16 16:01:44 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xdr_array.c,v 1.2 2019/06/05 16:25:43 hannken Exp $    */
+/*     $NetBSD: xdr_array.c,v 1.3 2019/06/16 16:01:44 christos Exp $   */
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -37,7 +37,7 @@
 static char *sccsid = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)xdr_array.c 2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: xdr_array.c,v 1.2 2019/06/05 16:25:43 hannken Exp $");
+__RCSID("$NetBSD: xdr_array.c,v 1.3 2019/06/16 16:01:44 christos Exp $");
 #endif
 #endif
 
@@ -85,11 +85,11 @@
  * xdr procedure to call to handle each element of the array.
  */
 bool_t
-xdr_array(XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize,
+xdr_array(XDR *xdrs, char **addrp, u_int *sizep, u_int maxsize, u_int elsize,
     xdrproc_t elproc)
 {
        u_int i;
-       caddr_t target = *addrp;
+       char *target = *addrp;
        u_int c;  /* the actual element count */
        bool_t stat = TRUE;
        u_int nodesize;



Home | Main Index | Thread Index | Old Index