[12/14] copy_file: rm extra error message

Submitted by Kir Kolyshkin on March 21, 2017, 10:03 p.m.

Details

Message ID 20170321220312.21346-3-kir@openvz.org
State New
Series "Spring '07 cleaning"
Headers show

Commit Message

Kir Kolyshkin March 21, 2017, 10:03 p.m.
No need to print an error after xmalloc(), it already printed one
for you.

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

Patch hide | download patch | download mbox

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) {