Skip to content

Commit

Permalink
proc_parse: remove trivial goto from vma_get_mapfile_user()
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Mirosław <emmir@google.com>
  • Loading branch information
osctobe committed Aug 25, 2023
1 parent e42b099 commit 2d0aec8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions criu/proc_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static int vma_get_mapfile_user(const char *fname, struct vma_area *vma, struct
fd = open(fname, O_RDONLY);
if (fd < 0) {
pr_perror("Can't open mapped [%s]", fname);
goto returnerr;
return -1;
}

if (vma_stat(vma, fd)) {
Expand Down Expand Up @@ -379,7 +379,6 @@ static int vma_get_mapfile_user(const char *fname, struct vma_area *vma, struct
pr_err("Failed to resolve mapping %lx filename\n", (unsigned long)vma->e->start);
closefd:
close(fd);
returnerr:
return -1;
}

Expand Down

0 comments on commit 2d0aec8

Please sign in to comment.