[CRIU] [PATCH 16/16] mem/shmem: Fix typos for_each_shmem macro

Mike Rapoport rppt at linux.ibm.com
Mon Jul 8 20:10:41 MSK 2019


On Fri, Jul 05, 2019 at 06:38:11PM +0300, Cyrill Gorcunov wrote:
> 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>

Reviewed-by: Mike Rapoport <rppt at linux.ibm.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
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
> 

-- 
Sincerely yours,
Mike.



More information about the CRIU mailing list