diff options
author | Daniil Baturin <daniil@baturin.org> | 2023-10-06 16:59:16 +0100 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-10-07 15:50:22 -0500 |
commit | d2978d7c37121fdc93ed8bb44cae01ec351d1f58 (patch) | |
tree | 531e6d48abe552a8979d58e4ff20685e831b3332 /src | |
parent | 200493d536ffaf6c54e218dead8253cdb91d2b5a (diff) | |
download | vyos-utils-d2978d7c37121fdc93ed8bb44cae01ec351d1f58.tar.gz vyos-utils-d2978d7c37121fdc93ed8bb44cae01ec351d1f58.zip |
numeric: T5638: Do not complain about range arguments in check_not_value when it's not necessary
(i.e., when no actual --not-value options are given)
(cherry picked from commit ba5e5638c15914c0b1bb3d61942f64046b38efd6)
Diffstat (limited to 'src')
-rw-r--r-- | src/numeric.ml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/numeric.ml b/src/numeric.ml index a3c5d11..f27c1ee 100644 --- a/src/numeric.ml +++ b/src/numeric.ml @@ -146,6 +146,7 @@ let check_not_ranges opts m = let check_not_values opts m = let excluded_values = List.map (number_of_string opts) opts.not_values in + if excluded_values = [] then () else match m with | Range_float _ -> Printf.ksprintf failwith "--not-value cannot be used with ranges" | Number_float num -> |