Re: [PATCH] aoe: error printed 1 too early

From: roel kluin
Date: Wed Feb 25 2009 - 17:35:45 EST


2009/2/25 David Miller <davem@xxxxxxxxxxxxx>:
> From: Ed Cashin <ecashin@xxxxxxxxxx>
> Date: Wed, 25 Feb 2009 12:09:02 -0500
>
>> Sounds like a good catch.  Did you find it because you saw the "cannot
>> free skb" message?
>
> He's finding these by looking for them in the code, not by
> actually triggering the condition.
>

Actually I made all functions a single line and then run some
bash scripts that parses pseudocode like:

echo "INFO: \7 reaches \9 - 1 after loop"
bli "
if \((${npz}[&|][&|])?
--($w) $em?[<=] ($K|$w|$d)
((&&|\|\|)$(nestedcode "()"))?\)
(\{
($(nestedcode "{}"))*
break ;
\}|
break ;
)
$ccode
(
$Q(\7 [=$em]= \9|\7 (>=|<) \9)
|
return \7 ;
)
"

This gives me a match like:
while(...) {
if (--i < 0)
break;
...
}
...
if (i != 0)
...
which is wrong since i reaches -1.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/