Re: [PATCH] checkpatch: Added warnings in favor of strscpy().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 28 Jun 2019 17:25:48 +0530, Nitin Gote <nitin.r.gote@xxxxxxxxx> wrote:
> 1. Deprecate strcpy() in favor of strscpy().

This isn’t a comment “against” this patch, but something I’ve been wondering
recently and which raises a question about how to handle strcpy’s deprecation
in particular. There is still one scenario where strcpy is useful: when GCC
replaces it with its builtin, inline version...

Would it be worth introducing a macro for strcpy-from-constant-string, which
would check that GCC’s builtin is being used (when building with GCC), and
fall back to strscpy otherwise?

Regards,

Stephen

Attachment: pgp5nzPoYYI68.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux