static void qInit(ahead)
struct tqHead *ahead;
{
- bzero((char *)ahead, sizeof(struct tqHead));
+ memset((char *)ahead, 0, sizeof(struct tqHead));
return;
}
} else {
th = gethostbyname(aname);
if (!th) return 0;
- bcopy(th->h_addr, &addr, sizeof(addr));
+ memcpy(&addr, th->h_addr, sizeof(addr));
}
if (addr == htonl(0x7f000001)) { /* local host */
if (code) return 0;
th = gethostbyname(hostname); /* returns host byte order */
if (!th) return 0;
- bcopy(th->h_addr, &addr, sizeof(addr));
+ memcpy(&addr, th->h_addr, sizeof(addr));
}
return (addr);
fprintf(STDOUT,"The partitions on the server are:\n");
for(i = 0 ; i < cnt ; i++){
if(dummyPartList.partFlags[i] & PARTVALID){
- bzero(pname,sizeof(pname));
+ memset(pname, 0, sizeof(pname));
MapPartIdIntoName(dummyPartList.partId[i],pname);
fprintf(STDOUT," %10s ",pname);
total++;
}
/* Zero out search attributes */
- bzero(&attributes,sizeof(struct VldbListByAttributes));
+ memset(&attributes, 0, sizeof(struct VldbListByAttributes));
if (as->parms[1].items) { /* -prefix */
strncpy(prefix, as->parms[1].items->data, VOLSER_MAXVOLNAME);
fflush(STDOUT);
/* Get all the VLDB entries on a server and/or partition */
- bzero(&arrayEntries, sizeof(arrayEntries));
+ memset(&arrayEntries, 0, sizeof(arrayEntries));
vcode = VLDB_ListAttributes(&attributes, &nentries, &arrayEntries);
if (vcode) {
fprintf(STDERR,"Could not access the VLDB for attributes\n");
}
for (thisindex = 0; (thisindex != -1); thisindex = nextindex) {
- bzero(&arrayEntries, sizeof(arrayEntries));
+ memset(&arrayEntries, 0, sizeof(arrayEntries));
centries = 0;
nextindex = -1;
tarray = ttarray;
/* Copy them in */
- bcopy((char *)arrayEntries.nbulkentries_val,
- ((char *)tarray)+tarraysize, parraysize);
+ memcpy(((char *)tarray)+tarraysize, (char *)arrayEntries.nbulkentries_val, parraysize);
tarraysize += parraysize;
}
}
char *ccode;
int match;
- bzero(&attributes,sizeof(struct VldbListByAttributes));
+ memset(&attributes, 0, sizeof(struct VldbListByAttributes));
attributes.Mask = 0;
seenprefix = (as->parms[0].items ? 1 : 0);
}
}
- bzero(&arrayEntries, sizeof(arrayEntries)); /* initialize to hint the stub to alloc space */
+ memset(&arrayEntries, 0, sizeof(arrayEntries)); /* initialize to hint the stub to alloc space */
vcode = VLDB_ListAttributes(&attributes, &nentries, &arrayEntries);
if (vcode) {
fprintf(STDERR,"Could not access the VLDB for attributes\n");
}
attributes.flag = VLOP_ALLOPERS;
attributes.Mask |= VLLIST_FLAG;
- bzero(&arrayEntries, sizeof(arrayEntries)); /*initialize to hint the stub to alloc space */
+ memset(&arrayEntries, 0, sizeof(arrayEntries)); /*initialize to hint the stub to alloc space */
vcode = VLDB_ListAttributes(&attributes, &nentries, &arrayEntries);
if(vcode) {
fprintf(STDERR,"Could not access the VLDB for attributes\n");