Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/ypbind u_int32_t -> uint32_t and similar



details:   https://anonhg.NetBSD.org/src/rev/f7c12322fdd7
branches:  trunk
changeset: 765233:f7c12322fdd7
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon May 23 02:06:41 2011 +0000

description:
u_int32_t -> uint32_t and similar

diffstat:

 usr.sbin/ypbind/ypbind.c |  34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diffs (129 lines):

diff -r 06533036d5d0 -r f7c12322fdd7 usr.sbin/ypbind/ypbind.c
--- a/usr.sbin/ypbind/ypbind.c  Mon May 23 00:21:50 2011 +0000
+++ b/usr.sbin/ypbind/ypbind.c  Mon May 23 02:06:41 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ypbind.c,v 1.63 2011/03/30 05:24:05 dholland Exp $     */
+/*     $NetBSD: ypbind.c,v 1.64 2011/05/23 02:06:41 dholland Exp $     */
 
 /*
  * Copyright (c) 1992, 1993 Theo de Raadt <deraadt%fsa.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef LINT
-__RCSID("$NetBSD: ypbind.c,v 1.63 2011/03/30 05:24:05 dholland Exp $");
+__RCSID("$NetBSD: ypbind.c,v 1.64 2011/05/23 02:06:41 dholland Exp $");
 #endif
 
 #include <sys/param.h>
@@ -87,7 +87,7 @@
        time_t dom_ask_t;
        int dom_lockfd;
        int dom_alive;
-       u_int32_t dom_xid;
+       uint32_t dom_xid;
 };
 
 static char *domainname;
@@ -117,7 +117,7 @@
 static struct rmtcallargs rmtca;
 static struct rmtcallres rmtcr;
 static bool_t rmtcr_outval;
-static u_long rmtcr_port;
+static unsigned long rmtcr_port;
 static SVCXPRT *udptransp, *tcptransp;
 
 int    _yp_invalid_domain(const char *);               /* from libc */
@@ -139,8 +139,8 @@
 static enum clnt_stat handle_replies(void);
 static enum clnt_stat handle_ping(void);
 static void rpc_received(char *, struct sockaddr_in *, int);
-static struct _dom_binding *xid2ypdb(u_int32_t);
-static u_int32_t unique_xid(struct _dom_binding *);
+static struct _dom_binding *xid2ypdb(uint32_t);
+static uint32_t unique_xid(struct _dom_binding *);
 static int broadcast(char *, int);
 static int direct(char *, int);
 static int direct_set(char *, int, struct _dom_binding *);
@@ -719,7 +719,7 @@
        msg.rm_call.cb_verf = rpcua->ah_verf;
 
        msg.rm_xid = ypdb->dom_xid;
-       xdrmem_create(&xdr, buf, (u_int)sizeof(buf), XDR_ENCODE);
+       xdrmem_create(&xdr, buf, (unsigned)sizeof(buf), XDR_ENCODE);
        if (!xdr_callmsg(&xdr, &msg)) {
                st = RPC_CANTENCODEARGS;
                AUTH_DESTROY(rpcua);
@@ -791,7 +791,7 @@
        msg.rm_call.cb_verf = rpcua->ah_verf;
 
        msg.rm_xid = ypdb->dom_xid;
-       xdrmem_create(&xdr, buf, (u_int)sizeof(buf), XDR_ENCODE);
+       xdrmem_create(&xdr, buf, (unsigned)sizeof(buf), XDR_ENCODE);
        if (!xdr_callmsg(&xdr, &msg)) {
                st = RPC_CANTENCODEARGS;
                AUTH_DESTROY(rpcua);
@@ -1068,18 +1068,18 @@
 #endif
                return RPC_CANTRECV;
        }
-       if ((size_t)inlen < sizeof(u_int32_t))
+       if ((size_t)inlen < sizeof(uint32_t))
                goto recv_again;
 
        /*
         * see if reply transaction id matches sent id.
         * If so, decode the results.
         */
-       xdrmem_create(&xdr, buf, (u_int)inlen, XDR_DECODE);
+       xdrmem_create(&xdr, buf, (unsigned)inlen, XDR_DECODE);
        if (xdr_replymsg(&xdr, &msg)) {
                if ((msg.rm_reply.rp_stat == MSG_ACCEPTED) &&
                    (msg.acpted_rply.ar_stat == SUCCESS)) {
-                       raddr.sin_port = htons((u_short)rmtcr_port);
+                       raddr.sin_port = htons((uint16_t)rmtcr_port);
                        ypdb = xid2ypdb(msg.rm_xid);
                        if (ypdb != NULL)
                                rpc_received(ypdb->dom_domain, &raddr, 0);
@@ -1129,14 +1129,14 @@
 #endif
                return RPC_CANTRECV;
        }
-       if ((size_t)inlen < sizeof(u_int32_t))
+       if ((size_t)inlen < sizeof(uint32_t))
                goto recv_again;
 
        /*
         * see if reply transaction id matches sent id.
         * If so, decode the results.
         */
-       xdrmem_create(&xdr, buf, (u_int)inlen, XDR_DECODE);
+       xdrmem_create(&xdr, buf, (unsigned)inlen, XDR_DECODE);
        if (xdr_replymsg(&xdr, &msg)) {
                if ((msg.rm_reply.rp_stat == MSG_ACCEPTED) &&
                    (msg.acpted_rply.ar_stat == SUCCESS)) {
@@ -1244,7 +1244,7 @@
 }
 
 static struct _dom_binding *
-xid2ypdb(u_int32_t xid)
+xid2ypdb(uint32_t xid)
 {
        struct _dom_binding *ypdb;
 
@@ -1254,12 +1254,12 @@
        return (ypdb);
 }
 
-static u_int32_t
+static uint32_t
 unique_xid(struct _dom_binding *ypdb)
 {
-       u_int32_t tmp_xid;
+       uint32_t tmp_xid;
 
-       tmp_xid = ((u_int32_t)(u_long)ypdb) & 0xffffffff;
+       tmp_xid = ((uint32_t)(unsigned long)ypdb) & 0xffffffff;
        while (xid2ypdb(tmp_xid) != NULL)
                tmp_xid++;
 



Home | Main Index | Thread Index | Old Index