diff options
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 9582f02b461..2505998b3d4 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -116,8 +116,8 @@ call_bail(void *data) { trans = conn->trans; if (trans) { - strncpy(peerid, conn->trans->peerinfo.identifier, - sizeof(peerid) - 1); + (void)snprintf(peerid, sizeof(peerid), "%s", + conn->trans->peerinfo.identifier); } } pthread_mutex_unlock(&conn->lock); |