From 96dbfc0c98a7496696f07b36b3fe923fd202bbb3 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 22 Apr 2021 13:59:23 -0700 Subject: [PATCH] criu: don't use errno for pr_error There is no need to, as pr_error already adds strerror(errno) to the error message. Signed-off-by: Kir Kolyshkin --- criu/cr-dedup.c | 4 ++-- criu/mem.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/criu/cr-dedup.c b/criu/cr-dedup.c index 71b7a9cc3..a09873f94 100644 --- a/criu/cr-dedup.c +++ b/criu/cr-dedup.c @@ -19,7 +19,7 @@ int cr_dedup(void) dirp = opendir(CR_PARENT_LINK); if (dirp == NULL) { - pr_perror("Can't enter previous snapshot folder, error=%d", errno); + pr_perror("Can't enter previous snapshot folder"); ret = -1; goto err; } @@ -29,7 +29,7 @@ int cr_dedup(void) ent = readdir(dirp); if (ent == NULL) { if (errno) { - pr_perror("Failed readdir, error=%d", errno); + pr_perror("Failed readdir"); ret = -1; goto err; } diff --git a/criu/mem.c b/criu/mem.c index 167838b98..e11f4f492 100644 --- a/criu/mem.c +++ b/criu/mem.c @@ -64,7 +64,7 @@ int do_task_reset_dirty_track(int pid) if (errno == EINVAL) /* No clear-soft-dirty in kernel */ ret = 1; else { - pr_perror("Can't reset %d's dirty memory tracker (%d)", pid, errno); + pr_perror("Can't reset %d's dirty memory tracker", pid); ret = -1; } } else {