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 <jose.bollo@open.eurogiciel.org>
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)