Skip to content
Commit 91024cb5 authored by Wenlin Kang's avatar Wenlin Kang Committed by Bruce Ashfield
Browse files

tipc: fix -Wstringop-truncation warnings



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]
  strncpy(name_copy, name, TIPC_MAX_BEARER_NAME);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: default avatarWenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
parent 474c8749
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment