diff --git a/usr.sbin/rpc.bootparamd/bootparamd.c b/usr.sbin/rpc.bootparamd/bootparamd.c index ed5f56ee5611..c2b55538b7a2 100644 --- a/usr.sbin/rpc.bootparamd/bootparamd.c +++ b/usr.sbin/rpc.bootparamd/bootparamd.c @@ -1,4 +1,4 @@ -/* $NetBSD: bootparamd.c,v 1.16 1998/02/10 06:46:10 lukem Exp $ */ +/* $NetBSD: bootparamd.c,v 1.17 1998/02/12 03:36:42 lukem Exp $ */ /* * This code is not copyright, and is placed in the public domain. @@ -11,7 +11,7 @@ #include #ifndef lint -__RCSID("$NetBSD: bootparamd.c,v 1.16 1998/02/10 06:46:10 lukem Exp $"); +__RCSID("$NetBSD: bootparamd.c,v 1.17 1998/02/12 03:36:42 lukem Exp $"); #endif #include @@ -126,7 +126,7 @@ main(argc, argv) if (!svc_register(transp, BOOTPARAMPROG, BOOTPARAMVERS, bootparamprog_1, IPPROTO_UDP)) - errx(1, "unable to register BOOTPARAMPROG version %d, udp", + errx(1, "unable to register BOOTPARAMPROG version %ld, udp", BOOTPARAMVERS); svc_run(); diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index d2d9eabf7800..66e5e36e654b 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -1,4 +1,4 @@ -/* $NetBSD: ypbind.c,v 1.34 1998/02/10 06:41:00 lukem Exp $ */ +/* $NetBSD: ypbind.c,v 1.35 1998/02/12 03:32:51 lukem Exp $ */ /* * Copyright (c) 1992, 1993 Theo de Raadt @@ -34,7 +34,7 @@ #include #ifndef LINT -__RCSID("$NetBSD: ypbind.c,v 1.34 1998/02/10 06:41:00 lukem Exp $"); +__RCSID("$NetBSD: ypbind.c,v 1.35 1998/02/12 03:32:51 lukem Exp $"); #endif #include @@ -82,10 +82,10 @@ struct _dom_binding { struct _dom_binding *dom_pnext; char dom_domain[YPMAXDOMAIN + 1]; struct sockaddr_in dom_server_addr; - in_port_t dom_server_port; + unsigned short int dom_server_port; int dom_socket; CLIENT *dom_client; - u_int32_t dom_vers; + long dom_vers; time_t dom_check_t; time_t dom_ask_t; int dom_lockfd; @@ -120,7 +120,7 @@ static int rpcsock, pingsock; static struct rmtcallargs rmtca; static struct rmtcallres rmtcr; static bool_t rmtcr_outval; -static u_int32_t rmtcr_port; +static u_long rmtcr_port; static SVCXPRT *udptransp, *tcptransp; int _yp_invalid_domain __P((const char *)); /* from libc */ @@ -182,7 +182,7 @@ makelock(ypdb) int fd; char path[MAXPATHLEN]; - (void) snprintf(path, sizeof(path), "%s/%s.%d", BINDINGDIR, + (void) snprintf(path, sizeof(path), "%s/%s.%ld", BINDINGDIR, ypdb->dom_domain, ypdb->dom_vers); if ((fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1) { @@ -203,7 +203,7 @@ removelock(ypdb) { char path[MAXPATHLEN]; - (void) snprintf(path, sizeof(path), "%s/%s.%d", + (void) snprintf(path, sizeof(path), "%s/%s.%ld", BINDINGDIR, ypdb->dom_domain, ypdb->dom_vers); (void) unlink(path); } @@ -948,7 +948,7 @@ direct_set(buf, outlen, ypdb) * "been_set" if this happens, otherwise we'll never * bind again. */ - snprintf(path, sizeof(path), "%s/%s.%d", BINDINGDIR, + snprintf(path, sizeof(path), "%s/%s.%ld", BINDINGDIR, ypdb->dom_domain, ypdb->dom_vers); if ((fd = open(path, O_SHLOCK|O_RDONLY, 0644)) == -1) { @@ -1024,7 +1024,7 @@ try_again: if (xdr_replymsg(&xdr, &msg)) { if ((msg.rm_reply.rp_stat == MSG_ACCEPTED) && (msg.acpted_rply.ar_stat == SUCCESS)) { - raddr.sin_port = htons((in_port_t)rmtcr_port); + raddr.sin_port = htons((u_short)rmtcr_port); ypdb = xid2ypdb(msg.rm_xid); if (ypdb != NULL) rpc_received(ypdb->dom_domain, &raddr, 0); @@ -1199,7 +1199,7 @@ unique_xid(ypdb) { u_int32_t tmp_xid; - tmp_xid = (u_int32_t)(((u_int32_t)ypdb) & 0xffffffff); + tmp_xid = (u_int32_t)(((u_long)ypdb) & 0xffffffff); while (xid2ypdb(tmp_xid) != NULL) tmp_xid++;