[RFC PATCH 02/12] recovery: constify vclock argument
Vladimir Davydov
vdavydov.dev at gmail.com
Wed Jun 6 20:45:02 MSK 2018
Neither recovery_new() nor recover_remaining_wals() need to modify it.
---
src/box/recovery.cc | 6 +++---
src/box/recovery.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/box/recovery.cc b/src/box/recovery.cc
index a5e0ad34..cf348d29 100644
--- a/src/box/recovery.cc
+++ b/src/box/recovery.cc
@@ -102,7 +102,7 @@ struct XlogGapError: public XlogError {
*/
struct recovery *
recovery_new(const char *wal_dirname, bool force_recovery,
- struct vclock *vclock)
+ const struct vclock *vclock)
{
struct recovery *r = (struct recovery *)
calloc(1, sizeof(*r));
@@ -178,7 +178,7 @@ recovery_delete(struct recovery *r)
*/
static void
recover_xlog(struct recovery *r, struct xstream *stream,
- struct vclock *stop_vclock)
+ const struct vclock *stop_vclock)
{
struct xrow_header row;
uint64_t row_count = 0;
@@ -238,7 +238,7 @@ recover_xlog(struct recovery *r, struct xstream *stream,
*/
void
recover_remaining_wals(struct recovery *r, struct xstream *stream,
- struct vclock *stop_vclock, bool scan_dir)
+ const struct vclock *stop_vclock, bool scan_dir)
{
struct vclock *clock;
diff --git a/src/box/recovery.h b/src/box/recovery.h
index b7e4a312..3a950e47 100644
--- a/src/box/recovery.h
+++ b/src/box/recovery.h
@@ -63,7 +63,7 @@ struct recovery {
struct recovery *
recovery_new(const char *wal_dirname, bool force_recovery,
- struct vclock *vclock);
+ const struct vclock *vclock);
void
recovery_delete(struct recovery *r);
@@ -94,6 +94,6 @@ recovery_finalize(struct recovery *r, struct xstream *stream);
*/
void
recover_remaining_wals(struct recovery *r, struct xstream *stream,
- struct vclock *stop_vclock, bool scan_dir);
+ const struct vclock *stop_vclock, bool scan_dir);
#endif /* TARANTOOL_RECOVERY_H_INCLUDED */
--
2.11.0
More information about the Tarantool-patches
mailing list