On 17-10-25, 17:33, Thorsten Blum wrote:
> strcpy() is deprecated; assign the NUL terminator directly instead.
> 
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <[email protected]>
> ---
>  drivers/cpufreq/cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 852e024facc3..0d3e77cf96a7 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -2550,7 +2550,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);

Acked-by: Viresh Kumar <[email protected]>

-- 
viresh

Reply via email to