changed bzero/bcmp/bcopy to memset/memcmp/memcpy
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@546 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -75,7 +75,7 @@ pop_init(POP *p,int argcount,char **argmessage)
|
||||
char * trace_file_name;
|
||||
|
||||
/* Initialize the POP parameter block */
|
||||
bzero ((char *)p,(int)sizeof(POP));
|
||||
memset (p,0, sizeof(POP));
|
||||
|
||||
/* Save my name in a global variable */
|
||||
p->myname = argmessage[0];
|
||||
@@ -184,7 +184,9 @@ pop_init(POP *p,int argcount,char **argmessage)
|
||||
/* Look for the client's IP address in the list returned
|
||||
for its name */
|
||||
for (addrp=ch_again->h_addr_list; *addrp; ++addrp)
|
||||
if (bcmp(*addrp,&(cs.sin_addr),sizeof(cs.sin_addr)) == 0) break;
|
||||
if (memcmp(*addrp, &cs.sin_addr, sizeof(cs.sin_addr))
|
||||
== 0)
|
||||
break;
|
||||
|
||||
if (!*addrp) {
|
||||
pop_log (p,POP_PRIORITY,
|
||||
|
@@ -65,7 +65,7 @@
|
||||
#define VALIDKEY(key) ( key[0] | key[1] | key[2] | key[3] | \
|
||||
key[4] | key[5] | key[6] | key[7])
|
||||
|
||||
#define SAMEKEY(k1, k2) (!bcmp((void *)k1, (void *)k2, sizeof(des_cblock)))
|
||||
#define SAMEKEY(k1, k2) (!memcmp(k1, k2, sizeof(des_cblock)))
|
||||
|
||||
typedef struct {
|
||||
short type;
|
||||
|
@@ -242,7 +242,7 @@ k_afsklog(char *cell, char *krealm)
|
||||
* Build a struct ClearToken
|
||||
*/
|
||||
ct.AuthHandle = c.kvno;
|
||||
bcopy((char *)c.session, ct.HandShakeKey, sizeof(c.session));
|
||||
memcpy (ct.HandShakeKey, c.session, sizeof(c.session));
|
||||
ct.ViceId = getuid(); /* is this always valid? */
|
||||
ct.BeginTimestamp = 1 + c.issue_date;
|
||||
ct.EndTimestamp = krb_life_to_time(c.issue_date, c.lifetime);
|
||||
@@ -252,30 +252,30 @@ k_afsklog(char *cell, char *krealm)
|
||||
* length of secret token followed by secret token
|
||||
*/
|
||||
sizeof_x = c.ticket_st.length;
|
||||
bcopy((char *)&sizeof_x, t, sizeof(sizeof_x));
|
||||
memcpy(t, &sizeof_x, sizeof(sizeof_x));
|
||||
t += sizeof(sizeof_x);
|
||||
bcopy((char *)c.ticket_st.dat, t, sizeof_x);
|
||||
memcpy(t, c.ticket_st.dat, sizeof_x);
|
||||
t += sizeof_x;
|
||||
/*
|
||||
* length of clear token followed by clear token
|
||||
*/
|
||||
sizeof_x = sizeof(ct);
|
||||
bcopy((char *)&sizeof_x, t, sizeof(sizeof_x));
|
||||
memcpy(t, &sizeof_x, sizeof(sizeof_x));
|
||||
t += sizeof(sizeof_x);
|
||||
bcopy((char *)&ct, t, sizeof_x);
|
||||
memcpy(t, &ct, sizeof_x);
|
||||
t += sizeof_x;
|
||||
|
||||
/*
|
||||
* do *not* mark as primary cell
|
||||
*/
|
||||
sizeof_x = 0;
|
||||
bcopy((char *)&sizeof_x, t, sizeof(sizeof_x));
|
||||
memcpy(t, &sizeof_x, sizeof(sizeof_x));
|
||||
t += sizeof(sizeof_x);
|
||||
/*
|
||||
* follow with cell name
|
||||
*/
|
||||
sizeof_x = strlen(cell) + 1;
|
||||
bcopy(cell, t, sizeof_x);
|
||||
memcpy(t, cell, sizeof_x);
|
||||
t += sizeof_x;
|
||||
|
||||
/*
|
||||
@@ -336,7 +336,7 @@ int
|
||||
k_unlog(void)
|
||||
{
|
||||
struct ViceIoctl parms;
|
||||
bzero((char *)&parms, sizeof(parms));
|
||||
memset(&parms, 0, sizeof(parms));
|
||||
return k_pioctl(0, VIOCUNLOG, &parms, 0);
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ k_hasafs(void)
|
||||
* If the syscall is absent we recive a SIGSYS.
|
||||
*/
|
||||
afs_entry_point = NO_ENTRY_POINT;
|
||||
bzero(&parms, sizeof(parms));
|
||||
memset(&parms, 0, sizeof(parms));
|
||||
|
||||
saved_errno = errno;
|
||||
saved_func = signal(SIGSYS, SIGSYS_handler);
|
||||
|
@@ -61,7 +61,7 @@ __icheckhost(u_int32_t raddr, const char *lhost)
|
||||
|
||||
/* Spin through ip addresses. */
|
||||
for (pp = hp->h_addr_list; *pp; ++pp)
|
||||
if (!bcmp(&raddr, *pp, sizeof(u_long)))
|
||||
if (memcmp(&raddr, *pp, sizeof(u_long)) == 0)
|
||||
return (1);
|
||||
|
||||
/* No match. */
|
||||
|
Reference in New Issue
Block a user