aboutsummaryrefslogtreecommitdiff
path: root/contrib/rdmacm-mux
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-07-12 20:51:54 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2019-07-15 11:20:42 +0200
commit60ae0b91fe78862a6cedc03966929258fa7a39e1 (patch)
tree51c3113e3b096506bc0f264b83fe11c1b11853e1 /contrib/rdmacm-mux
parentc2e8a52ca21473afbca4c98a362a299f5dbf13c8 (diff)
rdmacm-mux: fix strcpy string warning
../contrib/rdmacm-mux/main.c: In function ‘parse_args’: ../contrib/rdmacm-mux/main.c:118:13: error: ‘strncpy’ specified bound 3835 equals destination size [-Werror=stringop-truncation] 118 | strncpy(unix_socket_path, optarg, SOCKET_PATH_MAX); Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190712165154.11504-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'contrib/rdmacm-mux')
-rw-r--r--contrib/rdmacm-mux/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/rdmacm-mux/main.c b/contrib/rdmacm-mux/main.c
index 30c7052651..de53048f06 100644
--- a/contrib/rdmacm-mux/main.c
+++ b/contrib/rdmacm-mux/main.c
@@ -115,7 +115,7 @@ static void parse_args(int argc, char *argv[])
case 's':
/* This is temporary, final name will build below */
- strncpy(unix_socket_path, optarg, SOCKET_PATH_MAX);
+ strncpy(unix_socket_path, optarg, SOCKET_PATH_MAX - 1);
break;
case 'p':