Skip to content

Commit 9ecbc60

Browse files
Ahmed S. DarwishKAGA-KOKO
authored andcommitted
tools/x86/kcpuid: Strip bitfield names leading/trailing whitespace
While parsing and saving bitfield names from the CSV file, an extra leading space is copied verbatim. That extra space is not a big issue now, but further commits will add a new CSV file with much more padding for the bitfield's name column. Strip leading/trailing whitespaces while saving bitfield names. Signed-off-by: Ahmed S. Darwish <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent cf96ab1 commit 9ecbc60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/arch/x86/kcpuid/kcpuid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ static int parse_line(char *line)
379379
if (start)
380380
bdesc->start = strtoul(start, NULL, 0);
381381

382-
strcpy(bdesc->simp, tokens[4]);
382+
strcpy(bdesc->simp, strtok(tokens[4], " \t"));
383383
strcpy(bdesc->detail, tokens[5]);
384384
return 0;
385385

0 commit comments

Comments
 (0)