Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/rpc add size_t casts.



details:   https://anonhg.NetBSD.org/src/rev/3ce84b8e2dff
branches:  trunk
changeset: 572337:3ce84b8e2dff
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Dec 30 05:11:50 2004 +0000

description:
add size_t casts.

diffstat:

 lib/libc/rpc/clnt_vc.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 69817b770f38 -r 3ce84b8e2dff lib/libc/rpc/clnt_vc.c
--- a/lib/libc/rpc/clnt_vc.c    Thu Dec 30 05:08:37 2004 +0000
+++ b/lib/libc/rpc/clnt_vc.c    Thu Dec 30 05:11:50 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clnt_vc.c,v 1.10 2003/09/09 00:22:17 itojun Exp $      */
+/*     $NetBSD: clnt_vc.c,v 1.11 2004/12/30 05:11:50 christos Exp $    */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -36,7 +36,7 @@
 static char *sccsid = "@(#)clnt_tcp.c  2.2 88/08/01 4.0 RPCSRC";
 static char sccsid[] = "@(#)clnt_vc.c 1.19 89/03/16 Copyr 1988 Sun Micro";
 #else
-__RCSID("$NetBSD: clnt_vc.c,v 1.10 2003/09/09 00:22:17 itojun Exp $");
+__RCSID("$NetBSD: clnt_vc.c,v 1.11 2004/12/30 05:11:50 christos Exp $");
 #endif
 #endif
  
@@ -258,10 +258,10 @@
        ct->ct_fd = fd;
        ct->ct_wait.tv_usec = 0;
        ct->ct_waitset = FALSE;
-       ct->ct_addr.buf = malloc(raddr->maxlen);
+       ct->ct_addr.buf = malloc((size_t)raddr->maxlen);
        if (ct->ct_addr.buf == NULL)
                goto fooy;
-       memcpy(ct->ct_addr.buf, &raddr->buf, raddr->len);
+       memcpy(ct->ct_addr.buf, &raddr->buf, (size_t)raddr->len);
        ct->ct_addr.len = raddr->maxlen;
        ct->ct_addr.maxlen = raddr->maxlen;
 



Home | Main Index | Thread Index | Old Index