From 9293ed4628222ca4d618e2147c4db94e22106ae4 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Wed, 10 Apr 2024 06:52:59 +0530 Subject: src: avoid unnecessary sizeof() - 1 --- src/libnpass/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libnpass/util.c') diff --git a/src/libnpass/util.c b/src/libnpass/util.c index 11cf264..e2bbbff 100644 --- a/src/libnpass/util.c +++ b/src/libnpass/util.c @@ -16,7 +16,7 @@ int r_mkdir(const char *path, mode_t mode) char *p; char tmp[NAME_MAX + 1]; - strncpy(tmp, path, sizeof(tmp) - 1); + strncpy(tmp, path, sizeof(tmp)); len = strlen(tmp); if(tmp[len - 1] == '/') tmp[len - 1] = '\0'; -- cgit v1.2.3