From 5747adb3def62066ddf4ed753de116a534b5fee8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Wed, 5 Nov 2014 10:04:28 +0100 Subject: [PATCH] Removing a warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When compiled, the following warning was occuring: warning: format not a string literal and no format arguments This commit solves the problem. Change-Id: I271b6fcc3376bdaba8ed4bda3221d782c3e7381d Signed-off-by: José Bollo --- comm/comm_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comm/comm_socket.c b/comm/comm_socket.c index 3d5c22f..477845e 100755 --- a/comm/comm_socket.c +++ b/comm/comm_socket.c @@ -69,7 +69,7 @@ static int _get_new_socket(void) static void _set_sockaddr_un(struct sockaddr_un *saddr, const char *sock_path) { saddr->sun_family = AF_UNIX; - snprintf(saddr->sun_path, UNIX_PATH_MAX, sock_path); + strncpy(saddr->sun_path, sock_path, UNIX_PATH_MAX); } static const char *_create_server_sock_path(void) -- 2.7.4