]> xenbits.xensource.com Git - xen.git/commitdiff
tools/libs/guest: don't set errno to a negative value
authorJuergen Gross <jgross@suse.com>
Tue, 7 Jun 2022 12:01:27 +0000 (14:01 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jun 2022 12:01:27 +0000 (14:01 +0200)
Setting errno to a negative error value makes no sense.

Fixes: cb99a64029c9 ("libxc: arm: allow passing a device tree blob to the guest")
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 438e96ab479495a932391a22e219ee62fa8c4f47
master date: 2022-04-22 20:39:34 +0100

tools/libs/guest/xg_dom_core.c

index 2e4c1330ea6bd01160118bb9da546cd7e8855ea8..65975a75da37055affa3550661ef82bc8b36983d 100644 (file)
@@ -856,7 +856,7 @@ int xc_dom_devicetree_file(struct xc_dom_image *dom, const char *filename)
         return -1;
     return 0;
 #else
-    errno = -EINVAL;
+    errno = EINVAL;
     return -1;
 #endif
 }