scanner: stop adding trailing whitespace to copyright

Generated code was unconditionally adding a space to lines
in comments for copyright blocks even if the line was blank.
Updated to not add trailing whitespace for blank lines.

Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
This commit is contained in:
Jon Cruz 2015-10-26 11:50:32 +09:00 committed by Bryce Harrington
parent 9a170b9834
commit 1cf175eba4

View file

@ -1141,8 +1141,9 @@ format_copyright(const char *copyright)
}
if (copyright[i] == '\n' || copyright[i] == '\0') {
printf("%s %.*s\n",
printf("%s%s%.*s\n",
i == 0 ? "/*" : " *",
i > start ? " " : "",
i - start, copyright + start);
bol = 1;
}