]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
[dbus_conn] fix comparisons of abstract values
authorPrashanth Mundkur <prashanth.mundkur@citrix.com>
Thu, 16 Jul 2009 21:45:01 +0000 (14:45 -0700)
committerPrashanth Mundkur <prashanth.mundkur@citrix.com>
Thu, 16 Jul 2009 21:45:01 +0000 (14:45 -0700)
common/dbus_conn.ml

index e1dbdf22840d298606c902648b4506b0ca805124..e7c5d6a401fa8a0469016d181d9071a6fd3845bf 100644 (file)
@@ -61,14 +61,14 @@ let add_watch_callback conn watch =
        true
 
 let remove_watch_callback conn watch =
-       conn.watches <- List.filter (fun w -> w <> watch) conn.watches
+       conn.watches <- List.filter (fun w -> w != watch) conn.watches
 
 let remove_timeout_callback conn timeout =
        (* Scan both lists to increase robustness (instead
           of using the timeout state to select the list). *)
        let updated_timeouts =
                List.fold_left (fun acc (t, h) ->
-                                       if t = timeout then begin
+                                       if t == timeout then begin
                                                Eventloop.cancel_timer conn.ev_loop h;
                                                acc
                                        end else
@@ -76,14 +76,14 @@ let remove_timeout_callback conn timeout =
                               ) [] conn.timeouts
        in
        conn.timeouts <- updated_timeouts;
-       conn.inactive_timeouts <- List.filter (fun t -> t <> timeout) conn.inactive_timeouts
+       conn.inactive_timeouts <- List.filter (fun t -> t != timeout) conn.inactive_timeouts
 
 let timeout_handler conn timeout () =
        (* We cannot use remove_timeout_callback here since the
           eventloop handle is now invalid. *)
        let updated_timeouts =
                List.fold_left (fun acc (t,h) ->
-                                       if t = timeout then acc else (t,h) :: acc
+                                       if t == timeout then acc else (t,h) :: acc
                               ) [] conn.timeouts
        in
        conn.timeouts <- updated_timeouts;