pipe: print pipe_id as unsigned to generate an external pipe name

Submitted by Andrei Vagin on Sept. 24, 2019, 4:11 p.m.

Details

Message ID 20190924161143.7360-1-avagin@gmail.com
State New
Series "pipe: print pipe_id as unsigned to generate an external pipe name"
Headers show

Commit Message

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

Patch hide | download patch | download mbox

diff --git a/criu/pipes.c b/criu/pipes.c
index fd1a7e6bb..71d27d9b7 100644
--- a/criu/pipes.c
+++ b/criu/pipes.c
@@ -282,7 +282,7 @@  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) {
+	if (snprintf(buf, s, "pipe:[%u]", pi->pe->pipe_id) >= s) {
 		pr_err("Not enough room for pipe %d identifier string\n",
 				pi->pe->pipe_id);
 		return NULL;