diff --git a/src/c_sources.ml b/src/c_sources.ml index 0eb667e64baf..c84627cb7bb2 100644 --- a/src/c_sources.ml +++ b/src/c_sources.ml @@ -23,18 +23,16 @@ let empty = } let c_name, cxx_name = - let make what ext ~loc s = + let make what ~loc s = if match s with | "" | "." | ".." -> true | _ -> false then - Errors.fail loc - "%S is not a valid %s name." - s what what ext + Errors.fail loc "%S is not a valid %s name." s what else s in - ( make "C" "c" - , make "C++" "cpp" + ( make "C" + , make "C++" ) module Eval = struct