[08/13] image-desc: Use unsigned format for netdev

Submitted by Cyrill Gorcunov on Oct. 19, 2017, 9:59 p.m.

Details

Message ID 1508450384-29215-9-git-send-email-gorcunov@openvz.org
State New
Series "Clean up image format and fix anon shmem bits strip"
Headers show

Commit Message

Cyrill Gorcunov Oct. 19, 2017, 9:59 p.m.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 criu/image-desc.c | 2 +-
 criu/net.c        | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/image-desc.c b/criu/image-desc.c
index b5b55941d66f..6b1f5a007a24 100644
--- a/criu/image-desc.c
+++ b/criu/image-desc.c
@@ -68,7 +68,7 @@  struct cr_fd_desc_tmpl imgset_template[CR_FD_MAX] = {
 	FD_ENTRY_F(GHOST_FILE,	"ghost-file-%x", O_NOBUF),
 	FD_ENTRY(TCP_STREAM,	"tcp-stream-%x"),
 	FD_ENTRY(MNTS,		"mountpoints-%u"),
-	FD_ENTRY(NETDEV,	"netdev-%d"),
+	FD_ENTRY(NETDEV,	"netdev-%u"),
 	FD_ENTRY(NETNS,		"netns-%d"),
 	FD_ENTRY_F(IFADDR,	"ifaddr-%d", O_NOBUF),
 	FD_ENTRY_F(ROUTE,	"route-%d", O_NOBUF),
diff --git a/criu/net.c b/criu/net.c
index 618909eeaf76..5f2c627da5f4 100644
--- a/criu/net.c
+++ b/criu/net.c
@@ -1532,7 +1532,8 @@  static int __restore_link(struct ns_id *ns, struct net_link *link, int nlsk)
 
 static int read_links(struct ns_id *ns)
 {
-	int ret = -1, id = ns->id;
+	int ret = -1;
+	unsigned int id = ns->id;
 	struct cr_img *img;
 	NetDeviceEntry *nde;