logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: df086bb16609a24db947ec19a6ddd1e97317505c
parent 4d35492396ed5095667db243da663f77394dce4f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 28 Sep 2024 19:55:37 +0200

cmd/install: make target variable static

  cmd/install.c:155:25: warning: dangling pointer 'dest_path' to 'target' may be used [-Wdangling-pointer=]

Diffstat:

Mcmd/install.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/install.c b/cmd/install.c @@ -107,7 +107,7 @@ do_install(char *src, char *dest, bool is_dir) if(is_dir) { - char target[PATH_MAX] = ""; + static char target[PATH_MAX] = ""; char *src_basename = static_basename(src); if(snprintf(target, PATH_MAX, "%s/%s", dest, src_basename) < 0)