aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Stephani2020-08-09 19:31:01 +0200
committerPhilipp Stephani2020-08-09 19:31:26 +0200
commit5fef06fcf7ba284f206061293c3f9bcfac2daafc (patch)
treee748aa3fdbff46cae834cb47b1352290b3373136 /src
parent781bcce1196376b3db26a1c298f72779e819db76 (diff)
downloademacs-5fef06fcf7ba284f206061293c3f9bcfac2daafc.tar.gz
emacs-5fef06fcf7ba284f206061293c3f9bcfac2daafc.zip
* src/json.c (lisp_to_json): Simplify.
Diffstat (limited to 'src')
-rw-r--r--src/json.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/json.c b/src/json.c
index 814afc6d741..8c9583631ad 100644
--- a/src/json.c
+++ b/src/json.c
@@ -479,9 +479,7 @@ lisp_to_json (Lisp_Object lisp, struct json_configuration *conf)
479 { 479 {
480 intmax_t low = TYPE_MINIMUM (json_int_t); 480 intmax_t low = TYPE_MINIMUM (json_int_t);
481 intmax_t high = TYPE_MAXIMUM (json_int_t); 481 intmax_t high = TYPE_MAXIMUM (json_int_t);
482 intmax_t value; 482 intmax_t value = check_integer_range (lisp, low, high);
483 if (! (integer_to_intmax (lisp, &value) && low <= value && value <= high))
484 args_out_of_range_3 (lisp, make_int (low), make_int (high));
485 return json_check (json_integer (value)); 483 return json_check (json_integer (value));
486 } 484 }
487 else if (FLOATP (lisp)) 485 else if (FLOATP (lisp))