[v2] pipe: print pipe_id as unsigned to generate an external pipe name

Submitted by Andrei Vagin on Sept. 24, 2019, 8:36 p.m.

Details

Message ID 20190924203629.7687-1-avagin@gmail.com
State Accepted
Series "pipe: print pipe_id as unsigned to generate an external pipe name"
Commit 5f012a2959c3f60ec1187c97e73724c21a820c9e
Headers show

Commit Message

Andrei Vagin Sept. 24, 2019, 8:36 p.m.
Reported-by: Mr Jenkins
Signed-off-by: Andrei Vagin <avagin@gmail.com>
---
 criu/pipes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

v2: fix an error message.

Patch hide | download patch | download mbox

diff --git a/criu/pipes.c b/criu/pipes.c
index fd1a7e6bb..cb5da71de 100644
--- a/criu/pipes.c
+++ b/criu/pipes.c
@@ -282,8 +282,8 @@  static char *pipe_d_name(struct file_desc *d, char *buf, size_t s)
 	struct pipe_info *pi;
 
 	pi = container_of(d, struct pipe_info, d);
-	if (snprintf(buf, s, "pipe:[%d]", pi->pe->pipe_id) >= s) {
-		pr_err("Not enough room for pipe %d identifier string\n",
+	if (snprintf(buf, s, "pipe:[%u]", pi->pe->pipe_id) >= s) {
+		pr_err("Not enough room for pipe %u identifier string\n",
 				pi->pe->pipe_id);
 		return NULL;
 	}