summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index c7093501..3a5fa567 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -2164,10 +2164,13 @@ fsync_dir(const char *path)
if (slash != NULL) {
*slash = '\0';
- if (*dirbuf == '\0')
- strcpy(dirbuf, "/");
+ if (*dirbuf == '\0') {
+ dirbuf[0] = '/';
+ dirbuf[1] = '\0';
+ }
} else {
- strcpy(dirbuf, ".");
+ dirbuf[0] = '.';
+ dirbuf[1] = '\0';
}
dfd = open(dirbuf, O_RDONLY