[CRIU] [PATCH 16/16] mem/shmem: Fix typos for_each_shmem macro
Cyrill Gorcunov
gorcunov at gmail.com
Fri Jul 5 18:38:11 MSK 2019
Since we use _i as a counter in macro declaration
we should use it as a reference. This macro simply
happen to work now because of being called with
variable i declarated in the caller code.
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
criu/shmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/criu/shmem.c b/criu/shmem.c
index 1ca1b89320d2..965fecc56893 100644
--- a/criu/shmem.c
+++ b/criu/shmem.c
@@ -43,8 +43,8 @@
#define SHMEM_HASH_SIZE 32
static struct hlist_head shmems_hash[SHMEM_HASH_SIZE];
-#define for_each_shmem(_i, _si) \
- for (i = 0; i < SHMEM_HASH_SIZE; i++) \
+#define for_each_shmem(_i, _si) \
+ for (_i = 0; _i < SHMEM_HASH_SIZE; _i++) \
hlist_for_each_entry(_si, &shmems_hash[_i], h)
struct shmem_info {
--
2.20.1
More information about the CRIU
mailing list