[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 for-4.7 13/14] oxenstored: fix error when shifting negative value



By explicitly casting it to unsigned.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/ocaml/xenstored/systemd_stubs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/ocaml/xenstored/systemd_stubs.c 
b/tools/ocaml/xenstored/systemd_stubs.c
index 1bd5dea..a78a72b 100644
--- a/tools/ocaml/xenstored/systemd_stubs.c
+++ b/tools/ocaml/xenstored/systemd_stubs.c
@@ -124,7 +124,7 @@ CAMLprim value ocaml_sd_listen_fds(value connect_to)
        CAMLparam1(connect_to);
        CAMLlocal1(sock_ret);
 
-       sock_ret = Val_int(-1);
+       sock_ret = Val_int(-1U);
 
        CAMLreturn(sock_ret);
 }
@@ -144,7 +144,7 @@ CAMLprim value ocaml_sd_notify_ready(value ignore)
        CAMLparam1(ignore);
        CAMLlocal1(ret);
 
-       ret = Val_int(-1);
+       ret = Val_int(-1U);
 
        CAMLreturn(ret);
 }
-- 
2.6.4 (Apple Git-63)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.