Permalink
Browse files

Simplify filter function.

Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information...
1 parent d45e0b2 commit 2ef303bd07b76bc0007e16bc3028c3ffa790e594 @johnelse committed Jun 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 ocaml/xapi/xapi_xenops.ml
@@ -337,7 +337,7 @@ module MD = struct
(* Filter out invalid TSC modes. *)
let platformdata =
List.filter
- (fun (k, v) -> if k = "tsc_mode" && not(List.mem v ["0"; "1"; "2"; "3"]) then false else true)
+ (fun (k, v) -> k <> "tsc_mode" || List.mem v ["0"; "1"; "2"; "3"])
platformdata
in

0 comments on commit 2ef303b

Please sign in to comment.