#include <afs/param.h>
#include <roken.h>
+#include <afs/opr.h>
#include <lock.h>
Lock_Init(&afs_bufferLock);
/* Align each element of Buffers on a doubleword boundary */
tsize = (sizeof(struct buffer) + 7) & ~7;
- tp = (char *)malloc(abuffers * tsize);
- Buffers = (struct buffer **)malloc(abuffers * sizeof(struct buffer *));
- BufferData = (char *)malloc(abuffers * BUFFER_PAGE_SIZE);
+ tp = malloc(abuffers * tsize);
+ Buffers = malloc(abuffers * sizeof(struct buffer *));
+ BufferData = malloc(abuffers * BUFFER_PAGE_SIZE);
timecounter = 0;
LastBuffer = (struct buffer *)tp;
nbuffers = abuffers;
/* Now fill in the header. */
FidZap(bufferDir(lp));
FidCpy(bufferDir(lp), dir); /* set this */
+ memset(lp->data, 0, BUFFER_PAGE_SIZE); /* Don't leak stale data. */
lp->page = apage;
lp->accesstime = ++timecounter;