summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/src/changelog-misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/changelog/src/changelog-misc.h')
-rw-r--r--xlators/features/changelog/src/changelog-misc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/features/changelog/src/changelog-misc.h b/xlators/features/changelog/src/changelog-misc.h
index 93af201879e..e96533f7365 100644
--- a/xlators/features/changelog/src/changelog-misc.h
+++ b/xlators/features/changelog/src/changelog-misc.h
@@ -86,13 +86,13 @@
} while (0)
#define CHANGELOG_FILL_HTIME_DIR(changelog_dir, path) do { \
- strncpy (path, changelog_dir, sizeof (path) - 1); \
- strcat (path, "/htime"); \
+ snprintf (path, sizeof (path), "%s/htime", \
+ changelog_dir); \
} while(0)
#define CHANGELOG_FILL_CSNAP_DIR(changelog_dir, path) do { \
- strncpy (path, changelog_dir, sizeof (path) - 1); \
- strcat (path, "/csnap"); \
+ snprintf (path, sizeof (path), "%s/csnap", \
+ changelog_dir); \
} while(0)
/**
* everything after 'CHANGELOG_TYPE_METADATA_XATTR' are internal types