[CRIU] [PATCH] ipc: cleanup message dump a bit

Kinsbursky Stanislav skinsbursky at openvz.org
Thu Sep 20 04:16:39 EDT 2012


From: Stanislav Kinsbursky <skinsbursky at openvz.org>

Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
---
 ipc_ns.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
-------------- next part --------------
diff --git a/ipc_ns.c b/ipc_ns.c
index 9e259fe..b52cbb4 100644
--- a/ipc_ns.c
+++ b/ipc_ns.c
@@ -189,7 +189,7 @@ static void pr_info_ipc_msg_entry(const IpcMsgEntry *msg)
 static int dump_ipc_msg_queue_messages(int fd, const IpcMsgEntry *entry,
 				       unsigned int msg_nr)
 {
-	struct msgbuf *message = NULL;
+	struct msgbuf *message;
 	unsigned int msgmax;
 	int ret, msg_cnt = 0;
 	struct sysctl_req req[] = {
@@ -200,7 +200,7 @@ static int dump_ipc_msg_queue_messages(int fd, const IpcMsgEntry *entry,
 	ret = sysctl_op(req, CTL_READ);
 	if (ret < 0) {
 		pr_err("Failed to read max IPC message size\n");
-		goto err;
+		return ret;
 	}
 
 	msgmax += sizeof(struct msgbuf);


More information about the CRIU mailing list