[uClibc-cvs] uClibc/libc/inet/rpc bindresvport.c, 1.9, 1.10 clnt_generic.c, 1.7, 1.8 pmap_rmt.c, 1.11, 1.12 svc_simple.c, 1.9, 1.10 svc_tcp.c, 1.8, 1.9 svc_udp.c, 1.7, 1.8 xdr_array.c, 1.8, 1.9 xdr_reference.c, 1.7, 1.8

Erik Andersen andersen at uclibc.org
Thu Mar 18 11:28:54 UTC 2004


Update of /var/cvs/uClibc/libc/inet/rpc
In directory nail:/tmp/cvs-serv7711/libc/inet/rpc

Modified Files:
	bindresvport.c clnt_generic.c pmap_rmt.c svc_simple.c 
	svc_tcp.c svc_udp.c xdr_array.c xdr_reference.c 
Log Message:
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.


Index: clnt_generic.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/rpc/clnt_generic.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- a/clnt_generic.c	17 Jun 2002 21:12:14 -0000	1.7
+++ b/clnt_generic.c	18 Mar 2004 11:28:51 -0000	1.8
@@ -63,7 +63,7 @@
 
   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 @@
     }
   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

Index: xdr_array.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/rpc/xdr_array.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- a/xdr_array.c	7 Aug 2002 09:07:10 -0000	1.8
+++ b/xdr_array.c	18 Mar 2004 11:28:51 -0000	1.9
@@ -117,7 +117,7 @@
 	      (void) fputs (_("xdr_array: out of memory\n"), stderr);
 	    return FALSE;
 	  }
-	bzero (target, nodesize);
+	memset (target, 0, nodesize);
 	break;
 
       case XDR_FREE:

Index: bindresvport.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/rpc/bindresvport.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- a/bindresvport.c	2 Dec 2003 17:58:24 -0000	1.9
+++ b/bindresvport.c	18 Mar 2004 11:28:51 -0000	1.10
@@ -58,7 +58,7 @@
   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)

Index: pmap_rmt.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/rpc/pmap_rmt.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- a/pmap_rmt.c	18 Jun 2002 10:32:25 -0000	1.11
+++ b/pmap_rmt.c	18 Mar 2004 11:28:51 -0000	1.12
@@ -279,7 +279,7 @@
   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);

Index: svc_tcp.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/rpc/svc_tcp.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- a/svc_tcp.c	18 Jun 2002 10:32:25 -0000	1.8
+++ b/svc_tcp.c	18 Mar 2004 11:28:51 -0000	1.9
@@ -161,7 +161,7 @@
 	}
       madesock = TRUE;
     }
-  bzero ((char *) &addr, sizeof (addr));
+  memset ((char *) &addr, 0, sizeof (addr));
   addr.sin_family = AF_INET;
   if (bindresvport (sock, &addr))
     {

Index: xdr_reference.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/rpc/xdr_reference.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- a/xdr_reference.c	18 Jun 2002 10:32:26 -0000	1.7
+++ b/xdr_reference.c	18 Mar 2004 11:28:51 -0000	1.8
@@ -95,7 +95,7 @@
 	      (void) fputs (_("xdr_reference: out of memory\n"), stderr);
 	    return FALSE;
 	  }
-	bzero (loc, (int) size);
+	memset (loc, 0, (int) size);
 	break;
       default:
 	break;

Index: svc_simple.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/rpc/svc_simple.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- a/svc_simple.c	18 Feb 2004 01:15:34 -0000	1.9
+++ b/svc_simple.c	18 Mar 2004 11:28:51 -0000	1.10
@@ -161,7 +161,7 @@
     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);

Index: svc_udp.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/rpc/svc_udp.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- a/svc_udp.c	18 Jun 2002 10:32:26 -0000	1.7
+++ b/svc_udp.c	18 Mar 2004 11:28:51 -0000	1.8
@@ -134,7 +134,7 @@
 	}
       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 @@
 	(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




More information about the uClibc-cvs mailing list