From: Prashanth Mundkur Date: Thu, 16 Jul 2009 21:45:01 +0000 (-0700) Subject: [dbus_conn] fix comparisons of abstract values X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c3f4f5ebf2f94c04f0908eda9aa33756bddbec97;p=xenclient%2Ftoolstack.git [dbus_conn] fix comparisons of abstract values --- diff --git a/common/dbus_conn.ml b/common/dbus_conn.ml index e1dbdf2..e7c5d6a 100644 --- a/common/dbus_conn.ml +++ b/common/dbus_conn.ml @@ -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;