]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove some references to bcopy/bcmp/bzero.
authorRoland McGrath <roland@hack.frob.com>
Tue, 13 Jan 2015 19:12:55 +0000 (11:12 -0800)
committerRoland McGrath <roland@hack.frob.com>
Tue, 13 Jan 2015 19:12:55 +0000 (11:12 -0800)
ChangeLog
locale/programs/simple-hash.c
login/logout.c
nis/nss_compat/compat-pwd.c
nis/nss_compat/compat-spwd.c
resolv/gethnamaddr.c

index 3fa5e3b7f74abfdab147ea0a008b549645ceaa8f..2e27ba7af9b8aa5a2cc1967f9736787cc11a603c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-01-13  Roland McGrath  <roland@hack.frob.com>
+
+       * login/logout.c (logout): Use memset rather than bzero.
+       * nis/nss_compat/compat-pwd.c (getpwent_next_file): Likewise.
+       * nis/nss_compat/compat-spwd.c (getspent_next_file): Likewise.
+       * resolv/gethnamaddr.c (gethostbyaddr): Use memcmp rather than bcmp.
+       (_gethtbyaddr): Likewise.
+       * locale/programs/simple-hash.c (bcopy): Macro removed.
+
 2015-01-13  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
        * sysdeps/powerpc/powerpc64/multiarch/Makefile [sysdep_routines]:
index 3357483112a308f4d30387ae8367a04953f1eab0..a4412f97872f20ea4ae8192e2139a27dea04b999 100644 (file)
 # define BITSPERBYTE 8
 #endif
 
-#ifndef bcopy
-# define bcopy(s, d, n)        memcpy ((d), (s), (n))
-#endif
-
 #define hashval_t uint32_t
 #include "hashval.h"
 
index 422e5170e15e9ea28a3c426ce1fc8c9fc38da44d..16923f14a4b983f1d67aefcd858ede3e57c93d35 100644 (file)
@@ -45,9 +45,9 @@ logout (const char *line)
   if (getutline_r (&tmp, &utbuf, &ut) >= 0)
     {
       /* Clear information about who & from where.  */
-      bzero (ut->ut_name, sizeof ut->ut_name);
+      memset (ut->ut_name, '\0', sizeof ut->ut_name);
 #if _HAVE_UT_HOST - 0
-      bzero (ut->ut_host, sizeof ut->ut_host);
+      memset (ut->ut_host, '\0', sizeof ut->ut_host);
 #endif
 #if _HAVE_UT_TV - 0
       struct timeval tv;
index 7fd68a85c2c2a0c627292c00eecc0b21ea38a521..e3e3dbb308c2cca45fa26a2631dd6deaf9ee3efd 100644 (file)
@@ -578,7 +578,7 @@ getpwent_next_file (struct passwd *result, ent_t *ent,
          char *user, *host, *domain;
          struct __netgrent netgrdata;
 
-         bzero (&netgrdata, sizeof (struct __netgrent));
+         memset (&netgrdata, 0, sizeof (struct __netgrent));
          __internal_setnetgrent (&result->pw_name[2], &netgrdata);
          while (__internal_getnetgrent_r (&host, &user, &domain, &netgrdata,
                                           buf2, sizeof (buf2), errnop))
index 1f4356cedd3ff0de08d64c8550f5dae5400d3502..73c2ed3fe0bcd3044d9f181ce0e5f2038d159258 100644 (file)
@@ -532,7 +532,7 @@ getspent_next_file (struct spwd *result, ent_t *ent,
          char *user, *host, *domain;
          struct __netgrent netgrdata;
 
-         bzero (&netgrdata, sizeof (struct __netgrent));
+         memset (&netgrdata, 0, sizeof (struct __netgrent));
          __internal_setnetgrent (&result->sp_namp[2], &netgrdata);
          while (__internal_getnetgrent_r (&host, &user, &domain,
                                           &netgrdata, buf2, sizeof (buf2),
index 49cdc724e179dcf5b8d4b1110341a273cd873863..a861a847cecd2a500b7a0b7dbaff4ff7e7e02426 100644 (file)
@@ -672,8 +672,8 @@ gethostbyaddr(addr, len, af)
                return (NULL);
        }
        if (af == AF_INET6 && len == IN6ADDRSZ &&
-           (!bcmp(uaddr, mapped, sizeof mapped) ||
-            !bcmp(uaddr, tunnelled, sizeof tunnelled))) {
+           (!memcmp(uaddr, mapped, sizeof mapped) ||
+            !memcmp(uaddr, tunnelled, sizeof tunnelled))) {
                /* Unmap. */
                addr += sizeof mapped;
                uaddr += sizeof mapped;
@@ -922,7 +922,7 @@ _gethtbyaddr(addr, len, af)
 
        _sethtent(0);
        while ((p = _gethtent()))
-               if (p->h_addrtype == af && !bcmp(p->h_addr, addr, len))
+               if (p->h_addrtype == af && !memcmp(p->h_addr, addr, len))
                        break;
        _endhtent();
        return (p);