summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/src/changelog-misc.h
diff options
context:
space:
mode:
authorSaravanakumar Arumugam <sarumuga@redhat.com>2015-04-29 17:33:43 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-08 06:14:12 -0700
commit1b42cb507c3f72225f03a4715e051d9eb8c08e43 (patch)
tree1d4011ec1e728e0f2a0b22d7b9927e1702f266fe /xlators/features/changelog/src/changelog-misc.h
parente1ad65b6eadc8c607c46c1b8528df25de5726ecc (diff)
features/changelog: Avoid creation of empty changelogs
An empty changelog when rolled over gets unlinked and indexed with a modified path-name in htime file. The modification is "changelog" not "CHANGELOG" in basename of the empty changelog file. BUG: 1219479 Change-Id: Ib5b825ab563fa34d8dcf4368cf6cbf4b25d78a6d Original-Author: Ajeet Jha <ajha@redhat.com> Original-Author: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-On: http://review.gluster.org/#/c/9572/ Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/10642 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog-misc.h')
-rw-r--r--xlators/features/changelog/src/changelog-misc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/changelog/src/changelog-misc.h b/xlators/features/changelog/src/changelog-misc.h
index c0349ca3838..71c976f5010 100644
--- a/xlators/features/changelog/src/changelog-misc.h
+++ b/xlators/features/changelog/src/changelog-misc.h
@@ -73,7 +73,7 @@
fp = fdopen (fd_dup, "r"); \
if (fp) { \
if (fgets (buffer, len, fp)) { \
- elen = strlen (buffer); \
+ enc_len = strlen (buffer); \
sscanf (buffer, \
CHANGELOG_HEADER, \
&maj, &min, &enc); \