lkml.org 
[lkml]   [2003]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Remove useless assertions from reiserfs
From
Date
On Mon, 11 Aug 2003 13:45:30 EDT, Jeff Garzik said:
> Why are these useless?

> > if (len >= 12)
> > {
> > //assert(len < 16);
> > if (len >= 16)
> > BUG();
>
> Seems like a valid check to me...

Just before that, there's code:

while(len >= 16)
{
...
len -= 16;
}

So if that ever exits with a len >=16, we have a SERIOUS problem with
either the compiler or the hardware - as such, that "if (..) BUG" is dead code.
Similarly for the other checks.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.041 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site