mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
cpufreq: Replace deprecated strcpy() in cpufreq_unregister_governor()
strcpy() is deprecated; assign the NUL terminator directly instead. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> [ rjw: Subject tweaks ] Link: https://patch.msgid.link/20251017153354.82009-2-thorsten.blum@linux.dev Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
5313ec4a21
commit
ace0471774
@@ -2553,7 +2553,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)
|
||||
for_each_inactive_policy(policy) {
|
||||
if (!strcmp(policy->last_governor, governor->name)) {
|
||||
policy->governor = NULL;
|
||||
strcpy(policy->last_governor, "\0");
|
||||
policy->last_governor[0] = '\0';
|
||||
}
|
||||
}
|
||||
read_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
||||
|
||||
Reference in New Issue
Block a user