]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
libxl: pvusb: use %u to convert unsigned number
authorWei Liu <wei.liu2@citrix.com>
Mon, 11 Apr 2016 13:08:03 +0000 (14:08 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 22 Apr 2016 17:38:45 +0000 (18:38 +0100)
Both be_domid and fe_domid are unsigned.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_pvusb.c

index c66733bba968a389d9570f32699514b2359d1880..9f1e8427f5a73460e37d3777f0c6c09827ab3911 100644 (file)
@@ -350,7 +350,7 @@ static const char *vusb_be_from_xs_fe(libxl__gc *gc, const char *fe_path,
 
     /* Check to see that it has the proper form, and that fe_domid ==
      * target domid */
-    r = sscanf(be_path, "/local/domain/%d/backend/%15[^/]/%d",
+    r = sscanf(be_path, "/local/domain/%u/backend/%15[^/]/%u",
                &be_domid, be_type, &fe_domid);
 
     if (r != 3 || fe_domid != tgt_domid) {