mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
docs: kdoc: remove the brcount floor in process_proto_type()
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. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
parent
09b9297478
commit
bfa5bb3d10
|
|
@ -1609,9 +1609,7 @@ class KernelDoc:
|
|||
self.entry.brcount += r.group(2).count('{')
|
||||
self.entry.brcount -= r.group(2).count('}')
|
||||
|
||||
self.entry.brcount = max(self.entry.brcount, 0)
|
||||
|
||||
if r.group(2) == ';' and self.entry.brcount == 0:
|
||||
if r.group(2) == ';' and self.entry.brcount <= 0:
|
||||
self.dump_declaration(ln, self.entry.prototype)
|
||||
self.reset_state(ln)
|
||||
break
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user