Commit 9ecbc60a authored by Ahmed S. Darwish's avatar Ahmed S. Darwish Committed by Thomas Gleixner
Browse files

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: default avatarAhmed S. Darwish <darwi@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240718134755.378115-6-darwi@linutronix.de
parent cf96ab1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ static int parse_line(char *line)
	if (start)
		bdesc->start = strtoul(start, NULL, 0);

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