mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
mem/vma: Use memset for vm_area_list_init
To eliminate side effects, in particular setting nr_aios is already missing here. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
committed by
Andrei Vagin
parent
f3b8371c30
commit
6e86b9eb01
@@ -7,6 +7,7 @@
|
||||
#include "images/vma.pb-c.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <string.h>
|
||||
|
||||
struct vm_area_list {
|
||||
struct list_head h;
|
||||
@@ -21,11 +22,8 @@ struct vm_area_list {
|
||||
|
||||
static inline void vm_area_list_init(struct vm_area_list *vml)
|
||||
{
|
||||
memset(vml, 0, sizeof(*vml));
|
||||
INIT_LIST_HEAD(&vml->h);
|
||||
vml->nr = 0;
|
||||
vml->priv_size = 0;
|
||||
vml->priv_longest = 0;
|
||||
vml->shared_longest = 0;
|
||||
}
|
||||
|
||||
struct file_desc;
|
||||
|
Reference in New Issue
Block a user