Loading
tools/cpupower: Use strcspn() to strip trailing newline
Replace manual newline removal with strcspn() which is safer and cleaner. This avoids potential out-of-bounds access on empty strings and handles the case where no newline exists. Link: https://lore.kernel.org/r/20251127044536.715722-1-kaushlendra.kumar@intel.com Signed-off-by:Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>