From a120abea67d58b42a75daf496754d6bd1833c076 Mon Sep 17 00:00:00 2001 From: malc Date: Tue, 6 Jan 2015 18:31:45 +0300 Subject: [PATCH] Cosmetics --- wsi.ml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/wsi.ml b/wsi.ml index edd9a09..498d6f8 100644 --- a/wsi.ml +++ b/wsi.ml @@ -1110,21 +1110,14 @@ let getauth haddr dnum = close_in ic; name, data; in - let opt = - try - if String.length path = 0 - then None - else Some (open_in_bin path) - with exn -> - if Sys.file_exists path - then - dolog "failed to open X authority file `%S' : %s" - path (exntos exn); - None - in - match opt with - | None -> E.s, E.s - | Some ic -> readauth ic + if String.length path = 0 + then E.s, E.s + else + match open_in_bin path with + | ic -> readauth ic + | (exception exn) -> + dolog "failed to open X authority file `%S' : %s" path (exntos exn); + E.s, E.s ;; let init t rootwid w h platform = -- 2.11.4.GIT