Skip to content
Commit 5132681d authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by Len Brown
Browse files

tools/power turbostat: Fix names matching



Fix the 'find_msrp_by_name()' function which returns incorrect matches for
cases like this:

s1 = "C1-";
find_msrp_by_name(head, s1);

Inside 'find_msrp_by_name()':
...
s2 = "C1"
if !(strcnmp(s1, s2, len(s2)))
	// Incorrect match!
	return mp;

Full strings should be match istead. Switch to 'strcmp()' to fix the problem.

Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent b312d880
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment