From 87192685f55856d2c28021963ab2c308e21faddc Mon Sep 17 00:00:00 2001 From: Arnaud Cornet Date: Sun, 9 Dec 2018 19:40:36 -0500 Subject: [PATCH] Fix gcc-8 warning. Change weird use of strncpy where we know we will truncate and use an extra byte copy instead. --- src/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index de53430..bed836d 100644 --- a/src/log.c +++ b/src/log.c @@ -83,7 +83,7 @@ int check_dir_r(char *dirname) int slash_ok = 1; while (*tmp == '/') { if (slash_ok) { - strncpy(dir + count, "/", 1); + strncpy(dir + count, "/", 2); count++; slash_ok = 0; }