[CRIU] [PATCH 1/5] autofs: Delete alignment in autofs_create_fle()

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jun 1 04:34:28 PDT 2017


shmalloc() already returns address with sizeof(unsigned long)
alignment. So, the second alignment is useless.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/autofs.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/criu/autofs.c b/criu/autofs.c
index 15b0fc4b3..3c84c99f3 100644
--- a/criu/autofs.c
+++ b/criu/autofs.c
@@ -855,10 +855,9 @@ static int autofs_create_fle(struct pstree_item *task, FdinfoEntry *fe,
 	struct fdinfo_list_entry *le;
 	struct rst_info *rst_info = rsti(task);
 
-	le = shmalloc(sizeof(*le) + sizeof(int));
+	le = shmalloc(sizeof(*le));
 	if (!le)
 		return -1;
-	le = (void *)ALIGN((long)le, sizeof(int));
 
 	fle_init(le, vpid(task), fe);
 



More information about the CRIU mailing list