From 311e0005e50f36ab08563e3324288507ff348dee Mon Sep 17 00:00:00 2001 From: wuzhouhui Date: Thu, 30 Aug 2018 13:59:59 +0800 Subject: [PATCH] rpc: g_rpc_lock_path: remove redundant plus The value of sizeof(".lock") already includes null byte Change-Id: I521739f0a2b47e662e4f1f39c274afd38391f036 Signed-off-by: wuzhouhui Reviewed-on: https://review.gerrithub.io/423980 Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Pawel Wodkowski Tested-by: SPDK CI Jenkins --- lib/rpc/rpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rpc/rpc.c b/lib/rpc/rpc.c index 4890b66ad..985d40f46 100644 --- a/lib/rpc/rpc.c +++ b/lib/rpc/rpc.c @@ -45,7 +45,7 @@ #define RPC_DEFAULT_PORT "5260" static struct sockaddr_un g_rpc_listen_addr_unix = {}; -static char g_rpc_lock_path[sizeof(g_rpc_listen_addr_unix.sun_path) + sizeof(".lock") + 1]; +static char g_rpc_lock_path[sizeof(g_rpc_listen_addr_unix.sun_path) + sizeof(".lock")]; static int g_rpc_lock_fd = -1; static struct spdk_jsonrpc_server *g_jsonrpc_server = NULL;