• Sven Eckelmann's avatar
    batman-adv: Replace usage of strlcpy with strscpy · 529a8f93
    Sven Eckelmann authored
    The strscpy was introduced to fix some API problems around strlcpy. And
    checkpatch started to report recently that strlcpy is deprecated and
    strscpy is preferred.
    
    The functionality introduced in commit 30035e45 ("string: provide
    strscpy()") improves following points compared to strlcpy:
    
    * it doesn't read from memory beyond (src + size)
    * provides an easy way to check for destination buffer overflow
    * robust against asynchronous source buffer changes
    
    Since batman-adv doesn't depend on any of the previously mentioned behavior
    changes, the usage of strlcpy can simply be replaced by strscpy to silence
    checkpatch.
    Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
    529a8f93
soft-interface.c 32.3 KB