From 1b42cb507c3f72225f03a4715e051d9eb8c08e43 Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Wed, 29 Apr 2015 17:33:43 +0530 Subject: 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 Original-Author: Saravanakumar Arumugam Reviewed-On: http://review.gluster.org/#/c/9572/ Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/10642 Tested-by: Gluster Build System Reviewed-by: Aravinda VK Reviewed-by: Vijay Bellur --- xlators/features/changelog/src/changelog-misc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features/changelog/src/changelog-misc.h') 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); \ -- cgit