Putting the floor under brcount does not change the output in any way, just remove it. Change the termination test from ==0 to <=0 to prevent infinite loops in case somebody does something truly wacko in the code.
Unified · Split
| @@ -1609,9 +1609,7 @@ class KernelDoc: · 1608 unmodified lines | ||
| 1609 | 1609 | self.entry.brcount += r.group(2).count('{') |
| 1610 | 1610 | self.entry.brcount -= r.group(2).count('}') |
| 1611 | 1611 | |
| 1612 | − self.entry.brcount = max(self.entry.brcount, 0) | |
| 1613 | − | |
| 1614 | − if r.group(2) == ';' and self.entry.brcount == 0: | |
| 1612 | + if r.group(2) == ';' and self.entry.brcount <= 0: | |
| 1615 | 1613 | self.dump_declaration(ln, self.entry.prototype) |
| 1616 | 1614 | self.reset_state(ln) |
| 1617 | 1615 | break |