[CRIU] [PATCH 12/14] copy_file: rm extra error message

Kir Kolyshkin kir at openvz.org
Tue Mar 21 15:03:10 PDT 2017


No need to print an error after xmalloc(), it already printed one
for you.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 criu/util.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/criu/util.c b/criu/util.c
index bbe8f20..1396b37 100644
--- a/criu/util.c
+++ b/criu/util.c
@@ -523,10 +523,8 @@ int copy_file(int fd_in, int fd_out, size_t bytes)
 	ssize_t ret;
 
 	buffer = xmalloc(chunk);
-	if (buffer == NULL) {
-		pr_perror("failed to allocate buffer to copy file");
+	if (buffer == NULL)
 		return -1;
-	}
 
 	while (1) {
 		if (opts.remote) {
-- 
2.9.3



More information about the CRIU mailing list