Remove some references to bcopy/bcmp/bzero.

This commit is contained in:
Roland McGrath 2015-01-13 11:12:55 -08:00
parent 8bedcb5f03
commit 1c6e6f2315
6 changed files with 16 additions and 11 deletions

View File

@ -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]:

View File

@ -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"

View 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;

View 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))

View 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),

View 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);