diff --git a/src/afs/AIX/osi_file.c b/src/afs/AIX/osi_file.c index 67841403e3..9e70da4e7c 100644 --- a/src/afs/AIX/osi_file.c +++ b/src/afs/AIX/osi_file.c @@ -42,7 +42,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode) crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */ afs_osicred_initialized = 1; } - afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); + afile = osi_AllocSmallSpace(sizeof(struct osi_file)); setuerror(0); AFS_GUNLOCK(); ip = (struct inode *)igetinode((dev_t) cacheDev.dev, afs_cacheVfsp, diff --git a/src/afs/DARWIN/osi_file.c b/src/afs/DARWIN/osi_file.c index 14be585792..b61991010c 100644 --- a/src/afs/DARWIN/osi_file.c +++ b/src/afs/DARWIN/osi_file.c @@ -155,7 +155,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode) #endif afs_osicred_initialized = 1; } - afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); + afile = osi_AllocSmallSpace(sizeof(struct osi_file)); AFS_GUNLOCK(); #ifdef AFS_CACHE_VNODE_PATH if (!ainode->ufs) { diff --git a/src/afs/DARWIN/osi_sleep.c b/src/afs/DARWIN/osi_sleep.c index 2a4fb27929..789091dea9 100644 --- a/src/afs/DARWIN/osi_sleep.c +++ b/src/afs/DARWIN/osi_sleep.c @@ -124,7 +124,7 @@ afs_getevent(char *event) evp = evp->next; } if (!newp) { - newp = (afs_event_t *) osi_AllocSmallSpace(sizeof(afs_event_t)); + newp = osi_AllocSmallSpace(sizeof(afs_event_t)); afs_evhashcnt++; newp->next = afs_evhasht[hashcode]; afs_evhasht[hashcode] = newp; diff --git a/src/afs/FBSD/osi_file.c b/src/afs/FBSD/osi_file.c index 32debc3274..2b809dd032 100644 --- a/src/afs/FBSD/osi_file.c +++ b/src/afs/FBSD/osi_file.c @@ -36,7 +36,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode) AFS_STATCNT(osi_UFSOpen); if (cacheDiskType != AFS_FCACHE_TYPE_UFS) osi_Panic("UFSOpen called for non-UFS cache\n"); - afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); + afile = osi_AllocSmallSpace(sizeof(struct osi_file)); AFS_GUNLOCK(); code = VFS_VGET(afs_cacheVfsp, (ino_t) ainode->ufs, LK_EXCLUSIVE, &vp); AFS_GLOCK(); diff --git a/src/afs/FBSD/osi_vcache.c b/src/afs/FBSD/osi_vcache.c index d400492daa..07c332723f 100644 --- a/src/afs/FBSD/osi_vcache.c +++ b/src/afs/FBSD/osi_vcache.c @@ -44,7 +44,7 @@ struct vcache * osi_NewVnode(void) { struct vcache *tvc; - tvc = (struct vcache *)afs_osi_Alloc(sizeof(struct vcache)); + tvc = afs_osi_Alloc(sizeof(struct vcache)); tvc->v = NULL; /* important to clean this, or use memset 0 */ return tvc; diff --git a/src/afs/HPUX/osi_file.c b/src/afs/HPUX/osi_file.c index 587c149de0..44ed27140a 100644 --- a/src/afs/HPUX/osi_file.c +++ b/src/afs/HPUX/osi_file.c @@ -42,7 +42,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode) crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */ afs_osicred_initialized = 1; } - afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); + afile = osi_AllocSmallSpace(sizeof(struct osi_file)); setuerror(0); AFS_GUNLOCK(); ip = (struct inode *)igetinode(afs_cacheVfsp, (dev_t) cacheDev.dev, diff --git a/src/afs/IRIX/osi_file.c b/src/afs/IRIX/osi_file.c index 02ea9b6769..bdb458f147 100644 --- a/src/afs/IRIX/osi_file.c +++ b/src/afs/IRIX/osi_file.c @@ -55,7 +55,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode) crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */ afs_osicred_initialized = 1; } - afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); + afile = osi_AllocSmallSpace(sizeof(struct osi_file)); AFS_GUNLOCK(); afile->vnode = afs_XFSIGetVnode(ainode->ufs); AFS_GLOCK(); diff --git a/src/afs/IRIX/osi_sleep.c b/src/afs/IRIX/osi_sleep.c index 0f8c674003..e47b07f52e 100644 --- a/src/afs/IRIX/osi_sleep.c +++ b/src/afs/IRIX/osi_sleep.c @@ -100,7 +100,7 @@ afs_getevent(char *event) evp = evp->next; } if (!newp) { - newp = (afs_event_t *) osi_AllocSmallSpace(sizeof(afs_event_t)); + newp = osi_AllocSmallSpace(sizeof(afs_event_t)); afs_evhashcnt++; newp->next = afs_evhasht[hashcode]; afs_evhasht[hashcode] = newp; diff --git a/src/afs/LINUX24/osi_file.c b/src/afs/LINUX24/osi_file.c index fc90208cb9..b184602f2f 100644 --- a/src/afs/LINUX24/osi_file.c +++ b/src/afs/LINUX24/osi_file.c @@ -44,7 +44,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode) crhold(&afs_osi_cred); /* don't let it evaporate, since it is static */ afs_osicred_initialized = 1; } - afile = (struct osi_file *)osi_AllocLargeSpace(sizeof(struct osi_file)); + afile = osi_AllocLargeSpace(sizeof(struct osi_file)); AFS_GUNLOCK(); if (!afile) { osi_Panic("osi_UFSOpen: Failed to allocate %d bytes for osi_file.\n", diff --git a/src/afs/LINUX24/osi_groups.c b/src/afs/LINUX24/osi_groups.c index a0ac21de0f..fa637808e5 100644 --- a/src/afs/LINUX24/osi_groups.c +++ b/src/afs/LINUX24/osi_groups.c @@ -121,7 +121,7 @@ __setpag(cred_t **cr, afs_uint32 pagvalue, afs_uint32 *newpag, afs_int32 ngroups, code = 0; int j; - gidset = (gid_t *) osi_Alloc(NGROUPS * sizeof(gidset[0])); + gidset = osi_Alloc(NGROUPS * sizeof(gidset[0])); ngroups = afs_getgroups(*cr, gidset); if (afs_get_pag_from_groups(gidset[0], gidset[1]) == NOPAG) { diff --git a/src/afs/NBSD/osi_file.c b/src/afs/NBSD/osi_file.c index 6716ca0ab2..dd7811a8dc 100644 --- a/src/afs/NBSD/osi_file.c +++ b/src/afs/NBSD/osi_file.c @@ -31,7 +31,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode) AFS_STATCNT(osi_UFSOpen); if (cacheDiskType != AFS_FCACHE_TYPE_UFS) osi_Panic("UFSOpen called for non-UFS cache\n"); - afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); + afile = osi_AllocSmallSpace(sizeof(struct osi_file)); AFS_GUNLOCK(); code = VFS_VGET(cacheDev.mp, (ino_t) ainode->ufs, &vp); AFS_GLOCK(); diff --git a/src/afs/NBSD/osi_sleep.c b/src/afs/NBSD/osi_sleep.c index 76dab435d5..dfa07198df 100644 --- a/src/afs/NBSD/osi_sleep.c +++ b/src/afs/NBSD/osi_sleep.c @@ -218,7 +218,7 @@ afs_getevent(char *event) evp = evp->next; } if (!newp) { - newp = (afs_event_t *) osi_AllocSmallSpace(sizeof(afs_event_t)); + newp = osi_AllocSmallSpace(sizeof(afs_event_t)); afs_evhashcnt++; newp->next = afs_evhasht[hashcode]; afs_evhasht[hashcode] = newp; diff --git a/src/afs/NBSD/osi_vcache.c b/src/afs/NBSD/osi_vcache.c index 82034a3949..8b37efa35f 100644 --- a/src/afs/NBSD/osi_vcache.c +++ b/src/afs/NBSD/osi_vcache.c @@ -42,7 +42,7 @@ osi_NewVnode(void) { struct vcache *tvc; - tvc = (struct vcache *)afs_osi_Alloc(sizeof(struct vcache)); + tvc = afs_osi_Alloc(sizeof(struct vcache)); tvc->v = NULL; /* important to clean this, or use memset 0 */ return tvc; diff --git a/src/afs/OBSD/osi_file.c b/src/afs/OBSD/osi_file.c index 4b79cb358c..c19d86b7b8 100644 --- a/src/afs/OBSD/osi_file.c +++ b/src/afs/OBSD/osi_file.c @@ -34,7 +34,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode) AFS_STATCNT(osi_UFSOpen); if (cacheDiskType != AFS_FCACHE_TYPE_UFS) osi_Panic("UFSOpen called for non-UFS cache\n"); - afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); + afile = osi_AllocSmallSpace(sizeof(struct osi_file)); AFS_GUNLOCK(); code = VFS_VGET(cacheDev.mp, ainode->ufs, &vp); AFS_GLOCK(); diff --git a/src/afs/OBSD/osi_sleep.c b/src/afs/OBSD/osi_sleep.c index ccc74a4711..cbfdddc1d6 100644 --- a/src/afs/OBSD/osi_sleep.c +++ b/src/afs/OBSD/osi_sleep.c @@ -150,7 +150,7 @@ afs_getevent(char *event) evp = evp->next; } if (!newp) { - newp = (afs_event_t *) osi_AllocSmallSpace(sizeof(afs_event_t)); + newp = osi_AllocSmallSpace(sizeof(afs_event_t)); afs_evhashcnt++; newp->next = afs_evhasht[hashcode]; afs_evhasht[hashcode] = newp; diff --git a/src/afs/OBSD/osi_vcache.c b/src/afs/OBSD/osi_vcache.c index 6598ceabdb..f6e4fcae82 100644 --- a/src/afs/OBSD/osi_vcache.c +++ b/src/afs/OBSD/osi_vcache.c @@ -37,7 +37,7 @@ struct vcache * osi_NewVnode(void) { struct vcache *tvc; - tvc = (struct vcache *)afs_osi_Alloc(sizeof(struct vcache)); + tvc = afs_osi_Alloc(sizeof(struct vcache)); tvc->v = NULL; /* important to clean this, or use memset 0 */ return tvc; diff --git a/src/afs/SOLARIS/osi_file.c b/src/afs/SOLARIS/osi_file.c index 64169929e0..a1284aa4de 100644 --- a/src/afs/SOLARIS/osi_file.c +++ b/src/afs/SOLARIS/osi_file.c @@ -143,7 +143,7 @@ osi_VxfsOpen(afs_dcache_id_t *ainode) struct osi_file *afile = NULL; afs_int32 code = 0; int dummy; - afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); + afile = osi_AllocSmallSpace(sizeof(struct osi_file)); AFS_GUNLOCK(); code = (*vxfs_vx_vp_byino) (afs_cacheVfsp, &vp, (unsigned int)ainode->ufs); AFS_GLOCK(); @@ -175,7 +175,7 @@ osi_UfsOpen(afs_dcache_id_t *ainode) struct pathname lookpn; #endif struct osi_stat tstat; - afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); + afile = osi_AllocSmallSpace(sizeof(struct osi_file)); AFS_GUNLOCK(); /* diff --git a/src/afs/SOLARIS/osi_groups.c b/src/afs/SOLARIS/osi_groups.c index 0e4078a4d2..f8ac702391 100644 --- a/src/afs/SOLARIS/osi_groups.c +++ b/src/afs/SOLARIS/osi_groups.c @@ -80,7 +80,7 @@ setpag(cred, pagvalue, newpag, change_parent) AFS_STATCNT(setpag); - gidset = (gid_t *) osi_AllocSmallSpace(AFS_SMALLOCSIZ); + gidset = osi_AllocSmallSpace(AFS_SMALLOCSIZ); mutex_enter(&curproc->p_crlock); ngroups = afs_getgroups(*cred, gidset); diff --git a/src/afs/SOLARIS/osi_sleep.c b/src/afs/SOLARIS/osi_sleep.c index 2197d9e104..79a9e46ea8 100644 --- a/src/afs/SOLARIS/osi_sleep.c +++ b/src/afs/SOLARIS/osi_sleep.c @@ -96,7 +96,7 @@ afs_getevent(char *event) evp = evp->next; } if (!newp) { - newp = (afs_event_t *) osi_AllocSmallSpace(sizeof(afs_event_t)); + newp = osi_AllocSmallSpace(sizeof(afs_event_t)); afs_evhashcnt++; newp->next = afs_evhasht[hashcode]; afs_evhasht[hashcode] = newp; diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index 7972d84b27..2b37ce5bd3 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -329,7 +329,7 @@ usr_crcopy(struct usr_ucred *credp) { struct usr_ucred *newcredp; - newcredp = (struct usr_ucred *)afs_osi_Alloc(sizeof(struct usr_ucred)); + newcredp = afs_osi_Alloc(sizeof(struct usr_ucred)); *newcredp = *credp; newcredp->cr_ref = 1; return newcredp; @@ -340,7 +340,7 @@ usr_crget(void) { struct usr_ucred *newcredp; - newcredp = (struct usr_ucred *)afs_osi_Alloc(sizeof(struct usr_ucred)); + newcredp = afs_osi_Alloc(sizeof(struct usr_ucred)); newcredp->cr_ref = 1; return newcredp; } @@ -391,9 +391,7 @@ uafs_InitThread(void) * allocate the data block, so pthread_finish can free the buffer * when this thread terminates. */ - uptr = - (struct usr_user *)malloc(sizeof(struct usr_user) + - sizeof(struct usr_ucred)); + uptr = malloc(sizeof(struct usr_user) + sizeof(struct usr_ucred)); usr_assert(uptr != NULL); uptr->u_error = 0; uptr->u_prio = 0; @@ -447,7 +445,7 @@ afs_osi_Sleep(void *x) } index = WAITHASH(x); if (osi_waithash_avail == NULL) { - waitp = (osi_wait_t *) afs_osi_Alloc(sizeof(osi_wait_t)); + waitp = afs_osi_Alloc(sizeof(osi_wait_t)); usr_cond_init(&waitp->cond); } else { waitp = osi_waithash_avail; @@ -533,7 +531,7 @@ afs_osi_Wait(afs_int32 msec, struct afs_osi_WaitHandle *handle, int intok) } index = WAITHASH((caddr_t) handle); if (osi_waithash_avail == NULL) { - waitp = (osi_wait_t *) afs_osi_Alloc(sizeof(osi_wait_t)); + waitp = afs_osi_Alloc(sizeof(osi_wait_t)); usr_cond_init(&waitp->cond); } else { waitp = osi_waithash_avail; @@ -660,7 +658,7 @@ osi_UFSOpen(afs_dcache_id_t *ino) AFS_ASSERT_GLOCK(); AFS_GUNLOCK(); - fp = (struct osi_file *)afs_osi_Alloc(sizeof(struct osi_file)); + fp = afs_osi_Alloc(sizeof(struct osi_file)); usr_assert(fp != NULL); usr_assert(ino->ufs); @@ -3393,9 +3391,8 @@ uafs_opendir_r(char *path) /* * Set up the directory structures */ - dirp = - (usr_DIR *) afs_osi_Alloc(sizeof(usr_DIR) + USR_DIRSIZE + - sizeof(struct usr_dirent)); + dirp = afs_osi_Alloc(sizeof(usr_DIR) + USR_DIRSIZE + + sizeof(struct usr_dirent)); usr_assert(dirp != NULL); dirp->dd_buf = (char *)(dirp + 1); dirp->dd_fd = fd; diff --git a/src/afs/UKERNEL/osi_groups.c b/src/afs/UKERNEL/osi_groups.c index f72fd61ace..c053e150d3 100644 --- a/src/afs/UKERNEL/osi_groups.c +++ b/src/afs/UKERNEL/osi_groups.c @@ -74,7 +74,7 @@ usr_setpag(struct usr_ucred **cred, afs_uint32 pagvalue, afs_uint32 * newpag, AFS_STATCNT(setpag); - gidset = (gid_t *) osi_AllocSmallSpace(AFS_SMALLOCSIZ); + gidset = osi_AllocSmallSpace(AFS_SMALLOCSIZ); ngroups = afs_getgroups(*cred, gidset); if (afs_get_pag_from_groups(gidset[0], gidset[1]) == NOPAG) { diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index 60064c41b9..2a5d59412f 100644 --- a/src/afs/VNOPS/afs_vnop_lookup.c +++ b/src/afs/VNOPS/afs_vnop_lookup.c @@ -205,7 +205,7 @@ EvalMountData(char type, char *data, afs_uint32 states, afs_uint32 cellnum, * Don't know why we do this. Would have still found it in above call - jpm. */ if (!tvp && (prefetch == 2) && len < AFS_SMALLOCSIZ - 10) { - buf = (char *)osi_AllocSmallSpace(len + 10); + buf = osi_AllocSmallSpace(len + 10); strcpy(buf, volnamep); afs_strcat(buf, ".readonly"); @@ -300,8 +300,7 @@ EvalMountPoint(struct vcache *avc, struct vcache *advc, auniq = 1; if (avc->mvid == 0) - avc->mvid = - (struct VenusFid *)osi_AllocSmallSpace(sizeof(struct VenusFid)); + avc->mvid = osi_AllocSmallSpace(sizeof(struct VenusFid)); avc->mvid->Cell = (*avolpp)->cell; avc->mvid->Fid.Volume = (*avolpp)->volume; avc->mvid->Fid.Vnode = avnoid; @@ -554,7 +553,7 @@ Check_AtSys(struct vcache *avc, const char *aname, if (AFS_EQ_ATSYS(aname)) { state->offset = 0; - state->name = (char *)osi_AllocLargeSpace(MAXSYSNAME); + state->name = osi_AllocLargeSpace(MAXSYSNAME); state->allocked = 1; state->index = afs_getsysname(areq, avc, state->name, &num, sysnamelist); @@ -586,7 +585,7 @@ Next_AtSys(struct vcache *avc, struct vrequest *areq, if ((tname > state->name + 4) && (AFS_EQ_ATSYS(tname - 4))) { state->offset = (tname - 4) - state->name; - tname = (char *)osi_AllocLargeSpace(AFS_LRALLOCSIZ); + tname = osi_AllocLargeSpace(AFS_LRALLOCSIZ); strncpy(tname, state->name, state->offset); state->name = tname; state->allocked = 1; @@ -740,11 +739,9 @@ afs_DoBulkStat(struct vcache *adp, long dirCookie, struct vrequest *areqp) * one for fids and callbacks, and one for stat info. Well set * up our pointers to the memory from there, too. */ - statsp = (AFSFetchStatus *) - osi_Alloc(AFSCBMAX * sizeof(AFSFetchStatus)); - fidsp = (AFSFid *) osi_AllocLargeSpace(nentries * sizeof(AFSFid)); - cbsp = (AFSCallBack *) - osi_Alloc(AFSCBMAX * sizeof(AFSCallBack)); + statsp = osi_Alloc(AFSCBMAX * sizeof(AFSFetchStatus)); + fidsp = osi_AllocLargeSpace(nentries * sizeof(AFSFid)); + cbsp = osi_Alloc(AFSCBMAX * sizeof(AFSCallBack)); /* next, we must iterate over the directory, starting from the specified * cookie offset (dirCookie), and counting out nentries file entries. @@ -1173,8 +1170,7 @@ afs_DoBulkStat(struct vcache *adp, long dirCookie, struct vrequest *areqp) /* now copy ".." entry back out of volume structure, if necessary */ if (tvcp->mvstat == 2 && (dotdot.Fid.Volume != 0)) { if (!tvcp->mvid) - tvcp->mvid = (struct VenusFid *) - osi_AllocSmallSpace(sizeof(struct VenusFid)); + tvcp->mvid = osi_AllocSmallSpace(sizeof(struct VenusFid)); *tvcp->mvid = dotdot; } @@ -1865,7 +1861,7 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, afs_ucred_t *acr if (tvolp) { ObtainWriteLock(&tvc->lock, 134); if (tvc->mvid == NULL) { - tvc->mvid = (struct VenusFid *) + tvc->mvid = osi_AllocSmallSpace(sizeof(struct VenusFid)); } /* setup backpointer */ diff --git a/src/afs/VNOPS/afs_vnop_readdir.c b/src/afs/VNOPS/afs_vnop_readdir.c index 8316bb9c4a..4b5ea6ceeb 100644 --- a/src/afs/VNOPS/afs_vnop_readdir.c +++ b/src/afs/VNOPS/afs_vnop_readdir.c @@ -455,11 +455,7 @@ afs_readdir_move(struct DirEntry *de, struct vcache *vc, struct uio *auio, } #else /* AFS_SGI53_ENV */ #if defined(AFS_SUN5_ENV) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) -#if defined(AFS_SUN5_ENV) - direntp = (struct dirent64 *)osi_AllocLargeSpace(AFS_LRALLOCSIZ); -#else - direntp = (struct dirent *)osi_AllocLargeSpace(AFS_LRALLOCSIZ); -#endif + direntp = osi_AllocLargeSpace(AFS_LRALLOCSIZ); direntp->d_ino = afs_calc_inum(vc->f.fid.Cell, Volume, ntohl(Vnode)); #if defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) direntp->d_offset = off; @@ -605,8 +601,7 @@ afs_readdir(OSI_VC_DECL(avc), struct uio *auio, afs_ucred_t *acred) * it is necessary for hpux due to stack problems that seem to occur when coming thru the nfs * translator side XXX */ - struct min_direct *sdirEntry = - (struct min_direct *)osi_AllocSmallSpace(sizeof(struct min_direct)); + struct min_direct *sdirEntry = osi_AllocSmallSpace(sizeof(struct min_direct)); afs_int32 rlen; #endif diff --git a/src/afs/VNOPS/afs_vnop_symlink.c b/src/afs/VNOPS/afs_vnop_symlink.c index 3754c9ca9d..13591ce901 100644 --- a/src/afs/VNOPS/afs_vnop_symlink.c +++ b/src/afs/VNOPS/afs_vnop_symlink.c @@ -324,7 +324,7 @@ afs_MemHandleLink(struct vcache *avc, struct vrequest *areq) alen = len + 1; /* regular link */ else alen = len; /* mt point */ - rbuf = (char *)osi_AllocLargeSpace(AFS_LRALLOCSIZ); + rbuf = osi_AllocLargeSpace(AFS_LRALLOCSIZ); ObtainReadLock(&tdc->lock); addr = afs_MemCacheOpen(&tdc->f.inode); tlen = len; @@ -381,7 +381,7 @@ afs_UFSHandleLink(struct vcache *avc, struct vrequest *areq) alen = len + 1; /* regular link */ else alen = len; /* mt point */ - rbuf = (char *)osi_AllocLargeSpace(AFS_LRALLOCSIZ); + rbuf = osi_AllocLargeSpace(AFS_LRALLOCSIZ); tlen = len; ObtainReadLock(&tdc->lock); tfile = osi_UFSOpen(&tdc->f.inode); diff --git a/src/afs/afs_bypasscache.c b/src/afs/afs_bypasscache.c index d28ef3bec2..dd6ff1c7a0 100644 --- a/src/afs/afs_bypasscache.c +++ b/src/afs/afs_bypasscache.c @@ -582,7 +582,7 @@ afs_PrefetchNoCache(struct vcache *avc, iovecp = auio->uio_iov; #endif - tcallspec = (struct tlocal1 *) osi_Alloc(sizeof(struct tlocal1)); + tcallspec = osi_Alloc(sizeof(struct tlocal1)); do { tc = afs_Conn(&avc->f.fid, areq, SHARED_LOCK /* ignored */, &rxconn); if (tc) { diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index e3bae9b6eb..a2684fc9e0 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -2160,8 +2160,7 @@ afs_GetDCache(struct vcache *avc, afs_size_t abyte, ICL_TYPE_POINTER, tdc, ICL_TYPE_INT32, tdc->dflags); } - tsmall = - (struct afs_FetchOutput *)osi_AllocLargeSpace(sizeof(struct afs_FetchOutput)); + tsmall = osi_AllocLargeSpace(sizeof(struct afs_FetchOutput)); setVcacheStatus = 0; #ifndef AFS_NOSTATS /* diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c index 9fb766fb43..bf019c460a 100644 --- a/src/afs/afs_fetchstore.c +++ b/src/afs/afs_fetchstore.c @@ -372,7 +372,7 @@ rxfs_storeInit(struct vcache *avc, struct afs_conn *tc, if ( !tc ) return -1; - v = (struct rxfs_storeVariables *) osi_AllocSmallSpace(sizeof(struct rxfs_storeVariables)); + v = osi_AllocSmallSpace(sizeof(struct rxfs_storeVariables)); if (!v) osi_Panic("rxfs_storeInit: osi_AllocSmallSpace returned NULL\n"); memset(v, 0, sizeof(struct rxfs_storeVariables)); diff --git a/src/afs/afs_icl.c b/src/afs/afs_icl.c index 5fdd7e5031..113703a3ff 100644 --- a/src/afs/afs_icl.c +++ b/src/afs/afs_icl.c @@ -178,7 +178,7 @@ Afscall_icl(long opcode, long p1, long p2, long p3, long p4, long *retval) if (!logp) return ENOENT; #define BUFFERSIZE AFS_LRALLOCSIZ - lp = (afs_int32 *) osi_AllocLargeSpace(AFS_LRALLOCSIZ); + lp = osi_AllocLargeSpace(AFS_LRALLOCSIZ); elts = BUFFERSIZE / sizeof(afs_int32); if (p3 < elts) elts = p3; @@ -745,8 +745,7 @@ afs_icl_CreateLogWithFlags(char *name, afs_int32 logSize, afs_uint32 flags, } } - logp = (struct afs_icl_log *) - osi_AllocSmallSpace(sizeof(struct afs_icl_log)); + logp = osi_AllocSmallSpace(sizeof(struct afs_icl_log)); memset((caddr_t) logp, 0, sizeof(*logp)); logp->refCount = 1; @@ -1153,7 +1152,7 @@ afs_icl_CreateSetWithFlags(char *name, struct afs_icl_log *baseLogp, if (flags & ICL_CRSET_FLAG_PERSISTENT) states |= ICL_SETF_PERSISTENT; - setp = (struct afs_icl_set *)osi_AllocSmallSpace(sizeof(struct afs_icl_set)); + setp = osi_AllocSmallSpace(sizeof(struct afs_icl_set)); memset((caddr_t) setp, 0, sizeof(*setp)); setp->refCount = 1; if (states & ICL_SETF_FREED) diff --git a/src/afs/afs_mariner.c b/src/afs/afs_mariner.c index 9283b9a64d..30ec11ea3a 100644 --- a/src/afs/afs_mariner.c +++ b/src/afs/afs_mariner.c @@ -88,7 +88,7 @@ afs_MarinerLog(char *astring, struct vcache *avc) #ifdef STRUCT_SOCKADDR_HAS_SA_LEN taddr.sin_len = sizeof(taddr); #endif - tp = buf = (char *)osi_AllocSmallSpace(AFS_SMALLOCSIZ); + tp = buf = osi_AllocSmallSpace(AFS_SMALLOCSIZ); strcpy(tp, astring); tp += strlen(astring); diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 5cbbdb0667..e1e66b61ed 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -568,8 +568,7 @@ kioctl(int fdes, int com, caddr_t arg, caddr_t ext) if (((uap->com >> 8) & 0xff) == 'V') { struct afs_ioctl *datap; AFS_GLOCK(); - datap = - (struct afs_ioctl *)osi_AllocSmallSpace(AFS_SMALLOCSIZ); + datap = osi_AllocSmallSpace(AFS_SMALLOCSIZ); code=copyin_afs_ioctl((char *)uap->arg, datap); if (code) { osi_FreeSmallSpace(datap); @@ -677,8 +676,7 @@ afs_xioctl(struct afs_ioctl_sys *uap, rval_t *rvp) if (((uap->com >> 8) & 0xff) == 'V') { struct afs_ioctl *datap; AFS_GLOCK(); - datap = - (struct afs_ioctl *)osi_AllocSmallSpace(AFS_SMALLOCSIZ); + datap = osi_AllocSmallSpace(AFS_SMALLOCSIZ); code=copyin_afs_ioctl((char *)uap->arg, datap); if (code) { osi_FreeSmallSpace(datap); diff --git a/src/afs/afs_segments.c b/src/afs/afs_segments.c index 192a3d4b41..48cc204eda 100644 --- a/src/afs/afs_segments.c +++ b/src/afs/afs_segments.c @@ -178,7 +178,7 @@ afs_StoreAllSegments(struct vcache *avc, struct vrequest *areq, hset(newDV, avc->f.m.DataVersion); hash = DVHash(&avc->f.fid); foreign = (avc->f.states & CForeign); - dcList = (struct dcache **)osi_AllocLargeSpace(AFS_LRALLOCSIZ); + dcList = osi_AllocLargeSpace(AFS_LRALLOCSIZ); afs_Trace2(afs_iclSetp, CM_TRACE_STOREALL, ICL_TYPE_POINTER, avc, ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(avc->f.m.Length)); #if !defined(AFS_AIX32_ENV) && !defined(AFS_SGI65_ENV)