[Tarantool-patches] [PATCH 6/6] xlog: xdir_format_filename -- use PATH_MAX

Cyrill Gorcunov gorcunov at gmail.com
Thu Jun 18 01:03:35 MSK 2020


No need for +1 byte here, PATH_MAX already implies
end of string.

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 src/box/xlog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/box/xlog.c b/src/box/xlog.c
index 94f7838bf..bf68c6925 100644
--- a/src/box/xlog.c
+++ b/src/box/xlog.c
@@ -650,7 +650,7 @@ const char *
 xdir_format_filename(struct xdir *dir, int64_t signature,
 		enum log_suffix suffix)
 {
-	return tt_snprintf(PATH_MAX + 1, "%s/%020lld%s%s",
+	return tt_snprintf(PATH_MAX, "%s/%020lld%s%s",
 			   dir->dirname, (long long) signature,
 			   dir->filename_ext, suffix == INPROGRESS ?
 					      inprogress_suffix : "");
-- 
2.26.2



More information about the Tarantool-patches mailing list