From f8289b2e29d0bcf5f2c8557e908ee1fbe3656d1e Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Mon, 11 May 2026 07:00:04 +0200 Subject: [PATCH] tools: Update note about first line of a block When checking the first line of a block, the returned value is incremented by one. This commit updates doc to explain why. Signed-off-by: Jiri Vlasak --- tools/nxstyle.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/nxstyle.c b/tools/nxstyle.c index d464dc3fb01..3d70d575c63 100644 --- a/tools/nxstyle.c +++ b/tools/nxstyle.c @@ -1036,7 +1036,13 @@ static int block_comment_width(char *line) if (strncmp(&line[b], "/***", 4) == 0 && strncmp(&line[e - 2], "***", 3) == 0) { - /* Return the length of the line up to the final '*' */ + /* Return the length of the line up to the final '*'. + * + * Please note, that here we lie. We return the length of the line plus + * one--the leading '/' plus the number of '*' plus 1. The reason is to + * fit the length of the last line of a block--the leading space ' ' + * plus the number of '*' plus closing '/'. + */ return e + 1; }