From 004e34ffcaa7a53348479488b0716979f8a958df Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Fri, 8 May 2015 20:38:33 +0530 Subject: features/changelog: Fixing compilation issue This issue introduced due to manual rebase. Change-Id: I0589f4a0a1270190340f419b8022d6483bcf853d Signed-off-by: Aravinda VK BUG: 1219479 Reviewed-on: http://review.gluster.org/10685 Reviewed-by: Niels de Vos Reviewed-by: Kaleb KEITHLEY Tested-by: Niels de Vos Reviewed-on: http://review.gluster.org/10686 --- xlators/features/changelog/src/changelog-helpers.c | 5 ++++- xlators/features/changelog/src/changelog-misc.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'xlators/features/changelog') diff --git a/xlators/features/changelog/src/changelog-helpers.c b/xlators/features/changelog/src/changelog-helpers.c index 17c085fe047..bfe7a17a87e 100644 --- a/xlators/features/changelog/src/changelog-helpers.c +++ b/xlators/features/changelog/src/changelog-helpers.c @@ -356,6 +356,8 @@ cl_is_empty (xlator_t *this, int fd) int encoding = -1; char buffer[1024] = {0,}; struct stat stbuf = {0,}; + int major_version = -1; + int minor_version = -1; ret = fstat (fd, &stbuf); if (ret) { @@ -371,7 +373,8 @@ cl_is_empty (xlator_t *this, int fd) goto out; } - CHANGELOG_GET_ENCODING (fd, buffer, 1024, encoding, elen); + CHANGELOG_GET_HEADER_INFO (fd, buffer, 1024, encoding, + major_version, minor_version, elen); if (elen == stbuf.st_size) { ret = 1; diff --git a/xlators/features/changelog/src/changelog-misc.h b/xlators/features/changelog/src/changelog-misc.h index 71c976f5010..c0349ca3838 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)) { \ - enc_len = strlen (buffer); \ + elen = strlen (buffer); \ sscanf (buffer, \ CHANGELOG_HEADER, \ &maj, &min, &enc); \ -- cgit