Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f4ad40a authored by Jani Nikula's avatar Jani Nikula
Browse files

kernel-doc: reset contents and section harder



If the documentation comment does not have params or sections, the
section heading may leak from the previous documentation comment.

Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 32217761
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2763,6 +2763,8 @@ sub process_file($) {
		}

		$state = STATE_FIELD;
		$contents = "";
		$section = $section_default;
		if (/-(.*)/) {
		    # strip leading/trailing/multiple spaces
		    $descr= $1;
@@ -2960,6 +2962,7 @@ sub process_file($) {
		elsif (/$doc_end/)
		{
			dump_doc_section($file, $section, xml_escape($contents));
			$section = $section_default;
			$contents = "";
			$function = "";
			%parameterdescs = ();