Subject: Re: loaning for read() of regular files
To: enami tsugutomo <enami@sm.sony.co.jp>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 02/17/2005 09:10:50
On Thu, Feb 17, 2005 at 01:01:43PM +0900, enami tsugutomo wrote:
> Chuck Silvers <chuq@chuq.com> writes:
>
> > + memset(oanons, 0, sizeof(oanons));
> :
> > + for (i = 0; i < npages; i++) {
> :
> > + if (anon) {
> > + oanons[oanon++] = anon;
> :
> > + }
> :
> > + for (i = 0; i < oanon; i++) {
> > + anon = oanons[i];
> > + if (!anon) {
> > + continue;
> > + }
>
> memset() and if (!anon) statement aren't necessary.
yup, you're right. I've taken them out.
-Chuck