char *pathNamePtr;
{
char *ptr;
- ptr = rindex(pathNamePtr, '/');
+ ptr = strrchr(pathNamePtr, '/');
if ( ptr == 0 )
{
/* this should never happen */
eList->budb_dumpList_val = (struct budb_dumpEntry *)malloc (e_size * to_return);
if (!eList->budb_dumpList_val) return(BUDB_NOMEM);
}
- bzero(eList->budb_dumpList_val, e_size * to_return);
+ memset(eList->budb_dumpList_val, 0, e_size * to_return);
eList->budb_dumpList_len = to_return;
e = (char *)(eList->budb_dumpList_val);
else if ( !VolInfoMatch(volP,viP) ) /* Not the head volinfo struct */
{
hvia = via; /* remember the head volinfo struct */
- bcopy(viP, &hvi, sizeof(hvi));
+ memcpy(&hvi, viP, sizeof(hvi));
/* Search the same name chain for the correct volinfo structure */
for (via=ntohl(viP->sameNameChain); via; via=ntohl(viP->sameNameChain))
ptr = (struct chosenDump *) malloc(sizeof(*ptr));
if (!ptr)
return(0);
- bzero(ptr, sizeof(*ptr));
+ memset(ptr, 0, sizeof(*ptr));
ptr->addr = dumpAddr;
ptr->date = (afs_uint32) ntohl(dumpPtr->created);
}
/* Allocate a dump structure */
- bzero (&d, sizeof(d));
+ memset(&d, 0, sizeof(d));
eval = AllocStructure (ut, dump_BLOCK, 0, &da, &d);
if (eval) ABORT(eval);
/* Construct a database dump name */
strcpy(dumpName, DUMP_TAPE_NAME);
}
- else if (index(dumpPath,'/') == 0) {
+ else if (strchr(dumpPath,'/') == 0) {
int level, old, length, hash;
struct dump hostDump, diskDump;
struct memoryHashTable *mht;
/* end specifies how many dumps */
if (!end) ABORT(BUDB_BADFLAGS);
- bzero(&rock, sizeof(rock));
+ memset(&rock, 0, sizeof(rock));
rock.maxDumps = end;
scanHashTable(ut, &db.dumpName, wantDump, rememberDump, (char *) &rock);
/* Zero volume entry if the last tape has no volumes */
if (!lastVol) {
- bzero(volEntry, sizeof(*volEntry));
+ memset(volEntry, 0, sizeof(*volEntry));
} else {
/* Follow the volumes until we reach the last volume */
eval = dbread (ut,lastVol,&vf,sizeof(vf));
*new = 0;
- bzero (&t, sizeof(t));
+ memset(&t, 0, sizeof(t));
eval = AllocStructure (ut, tape_BLOCK, 0, &a, &t);
if (eval) ABORT(eval);