diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-03-18 11:28:51 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-03-18 11:28:51 +0000 |
commit | ada7878ba0d097b798277aaa095e9d935a64fa99 (patch) | |
tree | 1d202eb0bb53ff5167d8ab91ac90e48034920438 /libc/inet/rpc | |
parent | 0c91a787b60e3a8804c1001724b039a0b80c7bb4 (diff) |
Based on a patch from Alexandre Oliva, remove all reference to 'bzero' (which
is not a SuSv3 symbol). Rather than using __bzero internally per Alexandre's
original patch, use memset instead.
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r-- | libc/inet/rpc/bindresvport.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_generic.c | 4 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_rmt.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/svc_simple.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/svc_tcp.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/svc_udp.c | 4 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_array.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_reference.c | 2 |
8 files changed, 10 insertions, 10 deletions
diff --git a/libc/inet/rpc/bindresvport.c b/libc/inet/rpc/bindresvport.c index 579f17be7..1234f0682 100644 --- a/libc/inet/rpc/bindresvport.c +++ b/libc/inet/rpc/bindresvport.c @@ -58,7 +58,7 @@ bindresvport (int sd, struct sockaddr_in *sin) if (sin == (struct sockaddr_in *) 0) { sin = &myaddr; - bzero (sin, sizeof (*sin)); + memset (sin, 0, sizeof (*sin)); sin->sin_family = AF_INET; } else if (sin->sin_family != AF_INET) diff --git a/libc/inet/rpc/clnt_generic.c b/libc/inet/rpc/clnt_generic.c index 79df33113..349c0f62d 100644 --- a/libc/inet/rpc/clnt_generic.c +++ b/libc/inet/rpc/clnt_generic.c @@ -63,7 +63,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers, if (strcmp (proto, "unix") == 0) { - bzero ((char *)&sun, sizeof (sun)); + memset ((char *)&sun, 0, sizeof (sun)); sun.sun_family = AF_UNIX; strcpy (sun.sun_path, hostname); sock = RPC_ANYSOCK; @@ -110,7 +110,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers, } sin.sin_family = h->h_addrtype; sin.sin_port = 0; - bzero (sin.sin_zero, sizeof (sin.sin_zero)); + memset (sin.sin_zero, 0, sizeof (sin.sin_zero)); memcpy ((char *) &sin.sin_addr, h->h_addr, h->h_length); #warning getprotobyname is not reentrant... Add getprotobyname_r diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c index 6b135ede0..0bb9dd884 100644 --- a/libc/inet/rpc/pmap_rmt.c +++ b/libc/inet/rpc/pmap_rmt.c @@ -279,7 +279,7 @@ clnt_broadcast (prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) fd.fd = sock; fd.events = POLLIN; nets = getbroadcastnets (addrs, sock, inbuf); - bzero ((char *) &baddr, sizeof (baddr)); + memset ((char *) &baddr, 0, sizeof (baddr)); baddr.sin_family = AF_INET; baddr.sin_port = htons (PMAPPORT); baddr.sin_addr.s_addr = htonl (INADDR_ANY); diff --git a/libc/inet/rpc/svc_simple.c b/libc/inet/rpc/svc_simple.c index 81dead7a1..afc01bafa 100644 --- a/libc/inet/rpc/svc_simple.c +++ b/libc/inet/rpc/svc_simple.c @@ -161,7 +161,7 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) if (pl->p_prognum == prog && pl->p_procnum == proc) { /* decode arguments into a CLEAN buffer */ - bzero (xdrbuf, sizeof (xdrbuf)); /* required ! */ + memset (xdrbuf, 0, sizeof (xdrbuf)); /* required ! */ if (!svc_getargs (transp_l, pl->p_inproc, xdrbuf)) { svcerr_decode (transp_l); diff --git a/libc/inet/rpc/svc_tcp.c b/libc/inet/rpc/svc_tcp.c index cd4bb657d..e7ec083c8 100644 --- a/libc/inet/rpc/svc_tcp.c +++ b/libc/inet/rpc/svc_tcp.c @@ -161,7 +161,7 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize) } madesock = TRUE; } - bzero ((char *) &addr, sizeof (addr)); + memset ((char *) &addr, 0, sizeof (addr)); addr.sin_family = AF_INET; if (bindresvport (sock, &addr)) { diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c index 49a6b93ce..5e5dee9a3 100644 --- a/libc/inet/rpc/svc_udp.c +++ b/libc/inet/rpc/svc_udp.c @@ -134,7 +134,7 @@ svcudp_bufcreate (sock, sendsz, recvsz) } madesock = TRUE; } - bzero ((char *) &addr, sizeof (addr)); + memset ((char *) &addr, 0, sizeof (addr)); addr.sin_family = AF_INET; if (bindresvport (sock, &addr)) { @@ -406,7 +406,7 @@ svcudp_destroy (xprt) (type *) mem_alloc((unsigned) (sizeof(type) * (size))) #define BZERO(addr, type, size) \ - bzero((char *) addr, sizeof(type) * (int) (size)) + memset((char *) addr, 0, sizeof(type) * (int) (size)) /* * An entry in the cache diff --git a/libc/inet/rpc/xdr_array.c b/libc/inet/rpc/xdr_array.c index e1cfaa6a0..450f5b2ea 100644 --- a/libc/inet/rpc/xdr_array.c +++ b/libc/inet/rpc/xdr_array.c @@ -117,7 +117,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc) (void) fputs (_("xdr_array: out of memory\n"), stderr); return FALSE; } - bzero (target, nodesize); + memset (target, 0, nodesize); break; case XDR_FREE: diff --git a/libc/inet/rpc/xdr_reference.c b/libc/inet/rpc/xdr_reference.c index 383d8860a..1569e51b7 100644 --- a/libc/inet/rpc/xdr_reference.c +++ b/libc/inet/rpc/xdr_reference.c @@ -95,7 +95,7 @@ xdr_reference (xdrs, pp, size, proc) (void) fputs (_("xdr_reference: out of memory\n"), stderr); return FALSE; } - bzero (loc, (int) size); + memset (loc, 0, (int) size); break; default: break; |