diff options
author | Justin Stitt <[email protected]> | 2023-10-11 21:29:57 +0000 |
---|---|---|
committer | Saeed Mahameed <[email protected]> | 2023-11-15 11:34:30 -0800 |
commit | 10b49d0e76513a6f6890f321a10a2df0b779c761 (patch) | |
tree | f8ddb21b94cb8e11fa2f3a4deea840c14c6a5b54 /tools/perf/scripts/python/task-analyzer.py | |
parent | 9454e56433924af11451795b67d084eb14c1027f (diff) |
net/mlx5: simplify mlx5_set_driver_version string assignments
In total, just assigning this version string takes:
(1) strncpy()'s
(5) strlen()'s
(3) strncat()'s
(1) snprintf()'s
(4) max_t()'s
Moreover, `strncpy` is deprecated [1] and `strncat` really shouldn't be
used either [2]. With this in mind, let's simply use a single
`snprintf`.
Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://elixir.bootlin.com/linux/v6.6-rc5/source/include/linux/fortify-string.h#L448 [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: [email protected]
Cc: Kees Cook <[email protected]>
Signed-off-by: Justin Stitt <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions