Skip to content

Commit 08b5228

Browse files
author
Jonathan Corbet
committed
docs: kdoc: remove a useless empty capture group
The is_define_proto case in dump_function() uses a regex with an empty capture group - () - that has no use; just take it out. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent fee63c8 commit 08b5228

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/lib/kdoc/kdoc_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,11 +972,11 @@ def dump_function(self, ln, prototype):
972972
found = False
973973

974974
if is_define_proto:
975-
r = KernRe(r'^()(' + name + r')\s+')
975+
r = KernRe(r'^(' + name + r')\s+')
976976

977977
if r.search(prototype):
978978
return_type = ''
979-
declaration_name = r.group(2)
979+
declaration_name = r.group(1)
980980
func_macro = True
981981

982982
found = True

0 commit comments

Comments
 (0)