diff options
author | Roland McGrath <roland@hack.frob.com> | 2015-01-13 11:12:55 -0800 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2015-01-13 11:12:55 -0800 |
commit | 1c6e6f2315b343cbac94c2dd798a6ebb80489a12 (patch) | |
tree | 851756d9425469dfce159d7bb1a30bee0283816d | |
parent | 8bedcb5f03c62bf6001396dafdd82fbd4da7c2db (diff) | |
download | glibc-1c6e6f2315b343cbac94c2dd798a6ebb80489a12.zip glibc-1c6e6f2315b343cbac94c2dd798a6ebb80489a12.tar.gz glibc-1c6e6f2315b343cbac94c2dd798a6ebb80489a12.tar.bz2 |
Remove some references to bcopy/bcmp/bzero.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | locale/programs/simple-hash.c | 4 | ||||
-rw-r--r-- | login/logout.c | 4 | ||||
-rw-r--r-- | nis/nss_compat/compat-pwd.c | 2 | ||||
-rw-r--r-- | nis/nss_compat/compat-spwd.c | 2 | ||||
-rw-r--r-- | resolv/gethnamaddr.c | 6 |
6 files changed, 16 insertions, 11 deletions
@@ -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]: diff --git a/locale/programs/simple-hash.c b/locale/programs/simple-hash.c index 3357483..a4412f9 100644 --- a/locale/programs/simple-hash.c +++ b/locale/programs/simple-hash.c @@ -42,10 +42,6 @@ # define BITSPERBYTE 8 #endif -#ifndef bcopy -# define bcopy(s, d, n) memcpy ((d), (s), (n)) -#endif - #define hashval_t uint32_t #include "hashval.h" diff --git a/login/logout.c b/login/logout.c index 422e517..16923f1 100644 --- a/login/logout.c +++ b/login/logout.c @@ -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; diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c index 7fd68a8..e3e3dbb 100644 --- a/nis/nss_compat/compat-pwd.c +++ b/nis/nss_compat/compat-pwd.c @@ -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)) diff --git a/nis/nss_compat/compat-spwd.c b/nis/nss_compat/compat-spwd.c index 1f4356c..73c2ed3 100644 --- a/nis/nss_compat/compat-spwd.c +++ b/nis/nss_compat/compat-spwd.c @@ -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), diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index 49cdc72..a861a84 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -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); |