Commit 8c9b406f authored by Kevin Paul Reddy Janagari's avatar Kevin Paul Reddy Janagari Committed by Paolo Abeni
Browse files

tipc: Removing deprecated strncpy()



This patch suggests the replacement of strncpy with strscpy
as per Documentation/process/deprecated.
The strncpy() fails to guarantee NULL termination,
The function adds zero pads which isn't really convenient for short strings
as it may cause performance issues.

strscpy() is a preferred replacement because
it overcomes the limitations of strncpy mentioned above.

Compile Tested

Signed-off-by: default avatarKevin Paul Reddy Janagari <kevinpaul468@gmail.com>
Reviewed-by: default avatarTung Nguyen <tung.quang.nguyen@est.tech>
Tested-by: default avatarTung Nguyen <tung.quang.nguyen@est.tech>
Link: https://patch.msgid.link/20250411085010.6249-1-kevinpaul468@gmail.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 4c2e0b00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment