]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
tools/ocaml: make type of Xsraw.sync more precise
authorChristian Lindig <christian.lindig@citrix.com>
Tue, 30 Oct 2018 10:19:06 +0000 (10:19 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 1 Nov 2018 11:24:03 +0000 (11:24 +0000)
The type of Xsraw.sync is made more precise:

from val sync : (Xenbus.Xb.t -> 'a) -> con -> string
to   val sync : (Xenbus.Xb.t -> unit) -> con -> string

The first argument is enforced to return unit rather than a value that
is not used anyway.

[ No functional change. -iwj ]

Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/ocaml/libs/xs/xsraw.mli
tools/ocaml/xenstored/process.ml

index 57e4fb0c90e9a6abf206ec58c137f0e903fc68c9..374f0f9fad0d411f1ec7cdcfa8045e1ea9721d5a 100644 (file)
@@ -33,7 +33,7 @@ val has_watchevents : con -> bool
 val get_watchevent : con -> string * string
 val read_watchevent : con -> string * string
 val sync_recv : Xenbus.Xb.Op.operation -> con -> string
-val sync : (Xenbus.Xb.t -> 'a) -> con -> string
+val sync : (Xenbus.Xb.t -> unit) -> con -> string
 val ack : string -> unit
 val validate_path : string -> unit
 val validate_watch_path : string -> unit
index 977e7c11bec3e4ff2ca1f7d1f48c94ebe33bd598..d813d7fd505aab1ad3df1234fe9fc459991b8dc5 100644 (file)
@@ -348,7 +348,7 @@ let transaction_replay c t doms cons =
                                false
                        )
                (fun () ->
-                       Connection.end_transaction c tid None
+                       ignore @@ Connection.end_transaction c tid None
                )
 
 let do_watch con t domains cons data =
@@ -366,7 +366,7 @@ let do_unwatch con t domains cons data =
                | [node; token; ""]   -> node, token
                | _                   -> raise Invalid_Cmd_Args
                in
-       Connections.del_watch cons con node token
+       ignore @@ Connections.del_watch cons con node token
 
 let do_transaction_start con t domains cons data =
        if Transaction.get_id t <> Transaction.none then