From da9c8c1425143382aa1e2862e2ab519472636bc6 Mon Sep 17 00:00:00 2001
From: Vladimir Davydov <vdavydov.dev@gmail.com>
Date: Wed, 24 Oct 2018 15:53:55 +0300
Subject: [PATCH] wal: rename wal_watcher->events to pending_events

We will add another event bitmap to wal_watcher. To avoid confusion
between them, let's rename wal_watcher->events.
---
 src/box/wal.c | 10 +++++-----
 src/box/wal.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/box/wal.c b/src/box/wal.c
index d231cc98d2..b239acd48c 100644
--- a/src/box/wal.c
+++ b/src/box/wal.c
@@ -1033,7 +1033,7 @@ wal_watcher_notify(struct wal_watcher *watcher, unsigned events)
 		 * mark the watcher to resend it as soon as it
 		 * returns to WAL so as not to lose any events.
 		 */
-		watcher->events |= events;
+		watcher->pending_events |= events;
 		return;
 	}
 
@@ -1062,13 +1062,13 @@ wal_watcher_notify_complete(struct cmsg *cmsg)
 		return;
 	}
 
-	if (watcher->events != 0) {
+	if (watcher->pending_events != 0) {
 		/*
 		 * Resend the message if we got notified while
 		 * it was en route, see wal_watcher_notify().
 		 */
-		wal_watcher_notify(watcher, watcher->events);
-		watcher->events = 0;
+		wal_watcher_notify(watcher, watcher->pending_events);
+		watcher->pending_events = 0;
 	}
 }
 
@@ -1109,7 +1109,7 @@ wal_set_watcher(struct wal_watcher *watcher, const char *name,
 	watcher->msg.watcher = watcher;
 	watcher->msg.events = 0;
 	watcher->msg.cmsg.route = NULL;
-	watcher->events = 0;
+	watcher->pending_events = 0;
 
 	assert(lengthof(watcher->route) == 2);
 	watcher->route[0] = (struct cmsg_hop)
diff --git a/src/box/wal.h b/src/box/wal.h
index 7371ce933b..b7edcd43f1 100644
--- a/src/box/wal.h
+++ b/src/box/wal.h
@@ -101,7 +101,7 @@ struct wal_watcher {
 	 * It indicates that the message must be resend
 	 * right upon returning to WAL.
 	 */
-	unsigned events;
+	unsigned pending_events;
 };
 
 /**
-- 
GitLab