diff options
Diffstat (limited to 'xlators/features/changelog/lib/src/gf-history-changelog.c')
-rw-r--r-- | xlators/features/changelog/lib/src/gf-history-changelog.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/xlators/features/changelog/lib/src/gf-history-changelog.c b/xlators/features/changelog/lib/src/gf-history-changelog.c index 0bf130a0883..0d8289ccc82 100644 --- a/xlators/features/changelog/lib/src/gf-history-changelog.c +++ b/xlators/features/changelog/lib/src/gf-history-changelog.c @@ -517,7 +517,7 @@ gf_changelog_consume_wrap (void* data) ccd->retval = -1; - nread = sys_pread (ccd->fd, ccd->changelog, PATH_MAX, ccd->offset); + nread = sys_pread (ccd->fd, ccd->changelog, PATH_MAX-1, ccd->offset); if (nread < 0) { gf_msg (this->name, GF_LOG_ERROR, errno, CHANGELOG_LIB_MSG_READ_ERROR, @@ -628,7 +628,6 @@ gf_history_consume (void * data) gf_msg (this->name, GF_LOG_ERROR, ret, CHANGELOG_LIB_MSG_THREAD_CREATION_FAILED , "could not create consume-thread"); - ret = -1; goto sync; } else n_envoked++; @@ -1004,9 +1003,6 @@ gf_history_changelog (char* changelog_dir, unsigned long start, } } /* end of readdir() */ - if (!from || !to) - ret = -1; - out: if (dirp != NULL) (void) sys_closedir (dirp); |