diff options
author | David Arinzon <darinzon@amazon.com> | 2024-05-12 13:46:36 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-05-13 14:42:04 -0700 |
commit | 97776caf6c6e3a932d8e1410e6810cbfcb69d42d (patch) | |
tree | b116b5c867d4b3e58f76318d99a62a72f366f72b /lib/idr.c | |
parent | b37b98a3a0c1198bafe8c2d9ce0bc845b4e7a9a7 (diff) |
net: ena: Changes around strscpy calls
strscpy copies as much of the string as possible,
meaning that the destination string will be truncated
in case of no space. As this is a non-critical error in
our case, adding a debug level print for indication.
This patch also removes a -1 which was added to ensure
enough space for NUL, but strscpy destination string is
guaranteed to be NUL-terminted, therefore, the -1 is
not needed.
Signed-off-by: David Arinzon <darinzon@amazon.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240512134637.25299-5-darinzon@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib/idr.c')
0 files changed, 0 insertions, 0 deletions