mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
x86_energy_perf_policy: Cleanup: Use snprintf() for platform-profile
Better hygiene to use snprintf() instead of strcpy(). Assisted-by: GitHub-Copilot:Claude-Sonnet-4.6 Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
0aaac38a0d
commit
db2cffbc80
|
|
@ -678,7 +678,7 @@ void cmdline(int argc, char **argv)
|
|||
errx(1, "--platform-profile: value too long");
|
||||
if (!platform_profile_access(W_OK))
|
||||
errx(1, "Can not update platform-profile in '%s'", PATH_PLATFORM_PROFILE);
|
||||
strcpy(platform_profile, optarg);
|
||||
snprintf(platform_profile, sizeof(platform_profile), "%s", optarg);
|
||||
update_platform_profile = 1;
|
||||
break;
|
||||
case 'm':
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user