Commit cdbefe9
tools/power turbostat: Fix delimiter bug in print functions
Commands that add counters, such as 'turbostat --show C1,C1+'
display merged columns without a delimiter.
This is caused by the bad syntax: '(*printed++ ? delim : "")', shared by
print_name()/print_hex_value()/print_decimal_value()/print_float_value()
Use '((*printed)++ ? delim : "")' to correctly increment the value at *printed.
[lenb: fix code and commit message typo, re-word]
Fixes: 56dbb87 ("tools/power turbostat: Refactor added column header printing")
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>1 parent b6398bc commit cdbefe9
1 file changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2837 | 2837 | | |
2838 | 2838 | | |
2839 | 2839 | | |
2840 | | - | |
| 2840 | + | |
2841 | 2841 | | |
2842 | | - | |
| 2842 | + | |
2843 | 2843 | | |
2844 | 2844 | | |
2845 | 2845 | | |
2846 | 2846 | | |
2847 | 2847 | | |
2848 | | - | |
| 2848 | + | |
2849 | 2849 | | |
2850 | | - | |
| 2850 | + | |
2851 | 2851 | | |
2852 | 2852 | | |
2853 | 2853 | | |
2854 | 2854 | | |
2855 | 2855 | | |
2856 | 2856 | | |
2857 | | - | |
| 2857 | + | |
2858 | 2858 | | |
2859 | 2859 | | |
2860 | 2860 | | |
2861 | 2861 | | |
2862 | | - | |
| 2862 | + | |
2863 | 2863 | | |
2864 | 2864 | | |
2865 | 2865 | | |
| |||
0 commit comments