From db0b69b3973941ac59e918ffc4a9fdd0c8cbbf6b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 16 May 2014 09:51:58 +0200 Subject: [PATCH] tests/xbps/libxbps/config: fix clang warning: strncat() needs an additional byte for NUL. --- tests/xbps/libxbps/config/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xbps/libxbps/config/main.c b/tests/xbps/libxbps/config/main.c index 7f779f39..e37667ff 100644 --- a/tests/xbps/libxbps/config/main.c +++ b/tests/xbps/libxbps/config/main.c @@ -47,7 +47,7 @@ ATF_TC_BODY(config_include_test, tc) strncpy(xh.rootdir, tcsdir, sizeof(xh.rootdir)); strncpy(xh.metadir, tcsdir, sizeof(xh.metadir)); strncpy(conffile, tcsdir, sizeof(conffile)); - strncat(conffile, "/xbps.conf", sizeof(conffile)); + strncat(conffile, "/xbps.conf", sizeof(conffile)-1); xh.conffile = conffile; xh.flags = XBPS_FLAG_DEBUG; ATF_REQUIRE_EQ(xbps_init(&xh), 0);