Source-Changes-HG archive

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

[src/trunk]: src/lib/librpcsvc Fix u_int <-> size_t confusion.



details:   https://anonhg.NetBSD.org/src/rev/2d08c3cb7222
branches:  trunk
changeset: 521797:2d08c3cb7222
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Feb 05 23:00:59 2002 +0000

description:
Fix u_int <-> size_t confusion.

diffstat:

 lib/librpcsvc/rnusers.x |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (70 lines):

diff -r ae068e0320d0 -r 2d08c3cb7222 lib/librpcsvc/rnusers.x
--- a/lib/librpcsvc/rnusers.x   Tue Feb 05 22:41:47 2002 +0000
+++ b/lib/librpcsvc/rnusers.x   Tue Feb 05 23:00:59 2002 +0000
@@ -36,7 +36,7 @@
 %#ifndef lint
 %/*static char sccsid[] = "from: @(#)rnusers.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/
 %/*static char sccsid[] = "from: @(#)rnusers.x 2.1 88/08/01 4.0 RPCSRC";*/
-%__RCSID("$NetBSD: rnusers.x,v 1.10 2002/02/05 22:01:09 christos Exp $");
+%__RCSID("$NetBSD: rnusers.x,v 1.11 2002/02/05 23:00:59 christos Exp $");
 %#endif /* not lint */
 #endif
 
@@ -123,15 +123,15 @@
 %      if (xdrs->x_op == XDR_FREE)
 %              return (TRUE);
 %      ptr  = objp->ut_line;
-%      size = sizeof(objp->ut_line);
+%      size = (u_int)sizeof(objp->ut_line);
 %      if (!xdr_bytes(xdrs, &ptr, &size, size))
 %              return (FALSE);
 %      ptr  = objp->ut_name;
-%      size = sizeof(objp->ut_name);
+%      size = (u_int)sizeof(objp->ut_name);
 %      if (!xdr_bytes(xdrs, &ptr, &size, size))
 %              return (FALSE);
 %      ptr  = objp->ut_host;
-%      size = sizeof(objp->ut_host);
+%      size = (u_int)sizeof(objp->ut_host);
 %      if (!xdr_bytes(xdrs, &ptr, &size, size))
 %              return (FALSE);
 %      if (!xdr_long(xdrs, &objp->ut_time))
@@ -145,7 +145,7 @@
 %      struct ru_utmp **objpp;
 %{
 %
-%      if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct ru_utmp),
+%      if (!xdr_reference(xdrs, (char **) objpp, (u_int)sizeof(struct ru_utmp),
 %                         xdr_utmp))
 %              return (FALSE);
 %      return (TRUE);
@@ -158,7 +158,7 @@
 %{
 %
 %      if (!xdr_array(xdrs, (char **)&objp->uta_arr, (u_int *)&objp->uta_cnt,
-%                     MAXUSERS, sizeof(struct utmp *), xdr_utmpptr))
+%                     MAXUSERS, (u_int)sizeof(struct utmp *), xdr_utmpptr))
 %              return (FALSE);
 %      return (TRUE);
 %}
@@ -182,8 +182,8 @@
 %      struct utmpidle **objpp;
 %{
 %
-%      if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct utmpidle),
-%                         xdr_utmpidle))
+%      if (!xdr_reference(xdrs, (char **) objpp,
+%                         (u_int)sizeof(struct utmpidle), xdr_utmpidle))
 %              return (FALSE);
 %      return (TRUE);
 %}
@@ -195,7 +195,8 @@
 %{
 %
 %      if (!xdr_array(xdrs, (char **)&objp->uia_arr, (u_int *)&objp->uia_cnt,
-%                     MAXUSERS, sizeof(struct utmpidle *), xdr_utmpidleptr))
+%                     MAXUSERS, (u_int)sizeof(struct utmpidle *),
+%                     xdr_utmpidleptr))
 %              return (FALSE);
 %      return (TRUE);
 %}



Home | Main Index | Thread Index | Old Index