mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
Unix CM: Don't cast allocator returns
All of our allocators return (void *) values, so there is no need to cast the returns - doing so is just noise. Change-Id: I6b1009efbb5034225a4af0e19d03b74c628dfb82 Reviewed-on: http://gerrit.openafs.org/7457 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
9547615445
commit
cfcb45d4ae
@ -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,
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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) {
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
||||
/*
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
/*
|
||||
|
@ -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));
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user