]> git.sur5r.net Git - u-boot/commitdiff
tools/file2include: avoid incorrect comments
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 7 May 2018 21:00:22 +0000 (23:00 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 11 May 2018 00:38:34 +0000 (20:38 -0400)
Avoid creating incorrect comments like /* ...*/... */ by printing
'.' instead of '*' inside comments.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
tools/file2include.c

index e602f937f15603f94212980219151ed39c829e3c..b98af30a7281d675a58ba3ebb40f1ddf52f1ee54 100644 (file)
@@ -84,7 +84,7 @@ int main(int argc, char *argv[])
                        printf("\\x%02x", buf[j]);
                printf("\"}, /* ");
                for (j = i; j < i + BLOCK_SIZE && j < count; ++j) {
-                       if (buf[j] >= 0x20 && buf[j] <= 0x7e)
+                       if (buf[j] != '*' && buf[j] >= 0x20 && buf[j] <= 0x7e)
                                printf("%c", buf[j]);
                        else
                                printf(".");