[PATCH] tipc: fix -Wstringop-truncation warnings

2020-11-12 Thread Kang Wenlin
From: Wenlin Kang Replace strncpy() with strscpy(), fixes the following warning: In function 'bearer_name_validate', inlined from 'tipc_enable_bearer' at net/tipc/bearer.c:246:7: net/tipc/bearer.c:141:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]

[PATCH] ext4: fix -Wstringop-truncation warnings

2020-11-12 Thread Kang Wenlin
From: Wenlin Kang The strncpy() function may create a unterminated string, use strscpy_pad() instead. This fixes the following warning: fs/ext4/super.c: In function '__save_error_info': fs/ext4/super.c:349:2: warning: 'strncpy' specified bound 32 equals destination size