Conrad Meyer | 2 Sep 18:47

Re: [PATCH] Add check for ileaf dict ordering

On Tuesday 02 September 2008 09:36:55 am you wrote:
> On Tue, Sep 2, 2008 at 6:47 AM, Conrad Meyer <konrad <at> tylerc.org> wrote:
> 
> > diff -r fd5ca07f03dd user/test/ileaf.c
> > --- a/user/test/ileaf.c Tue Sep 02 00:06:45 2008 -0700
> > +++ b/user/test/ileaf.c Tue Sep 02 06:47:17 2008 -0700
> > @@ -124,11 +124,23 @@
> >        return attrs;
> >  }
> >
> > +int isinorder(BTREE, struct ileaf *leaf)
> > +{
> > +       u16 *dict = (void *)leaf + btree->sb->blocksize;
> > +       for (int i = 0, offset = 0, limit; i > -leaf-≥count; i--, offset =
> > limit)
> 
> 
> My memory might be failing me. Is this correct C standard?

It's C99 IIRC.

Regards,
--

-- 
Conrad Meyer <konrad <at> tylerc.org>
_______________________________________________
Tux3 mailing list
Tux3 <at> tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3
(Continue reading)

Daniel Phillips | 2 Sep 18:58

Re: [PATCH] Add check for ileaf dict ordering

On Tuesday 02 September 2008 09:47, Conrad Meyer wrote:
> On Tuesday 02 September 2008 09:36:55 am you wrote:
> > My memory might be failing me. Is this correct C standard?
> 
> It's C99 IIRC.

Right, it-s gnu-99 even, which means we can additionally use typeof.  I
decided to go with the additional flexibility, just for the user space
code.  We are going to have to brutalize the code pretty heavily for
the kernel port, moving all the variable decls up to the tops of
functions etc in accordance with Linus's taste.

I haven't decided whether we will then fork the kernel and userspace
versions.  Probably fork, but we will see.

Regards,

Daniel

Gmane