aboutsummaryrefslogtreecommitdiffstats
path: root/src/emacs-module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emacs-module.c')
-rw-r--r--src/emacs-module.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c
index d158e243139..10699ec25d9 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -416,7 +416,7 @@ module_global_reference_p (emacs_value v, ptrdiff_t *n)
416 } 416 }
417 /* Only used for debugging, so we don't care about overflow, just 417 /* Only used for debugging, so we don't care about overflow, just
418 make sure the operation is defined. */ 418 make sure the operation is defined. */
419 INT_ADD_WRAPV (*n, h->count, n); 419 ckd_add (n, *n, h->count);
420 return false; 420 return false;
421} 421}
422 422
@@ -435,7 +435,7 @@ module_make_global_ref (emacs_env *env, emacs_value value)
435 { 435 {
436 Lisp_Object value = HASH_VALUE (h, i); 436 Lisp_Object value = HASH_VALUE (h, i);
437 struct module_global_reference *ref = XMODULE_GLOBAL_REFERENCE (value); 437 struct module_global_reference *ref = XMODULE_GLOBAL_REFERENCE (value);
438 bool overflow = INT_ADD_WRAPV (ref->refcount, 1, &ref->refcount); 438 bool overflow = ckd_add (&ref->refcount, ref->refcount, 1);
439 if (overflow) 439 if (overflow)
440 overflow_error (); 440 overflow_error ();
441 return &ref->value; 441 return &ref->value;
@@ -662,7 +662,7 @@ module_funcall (emacs_env *env, emacs_value func, ptrdiff_t nargs,
662 Lisp_Object *newargs; 662 Lisp_Object *newargs;
663 USE_SAFE_ALLOCA; 663 USE_SAFE_ALLOCA;
664 ptrdiff_t nargs1; 664 ptrdiff_t nargs1;
665 if (INT_ADD_WRAPV (nargs, 1, &nargs1)) 665 if (ckd_add (&nargs1, nargs, 1))
666 overflow_error (); 666 overflow_error ();
667 SAFE_ALLOCA_LISP (newargs, nargs1); 667 SAFE_ALLOCA_LISP (newargs, nargs1);
668 newargs[0] = value_to_lisp (func); 668 newargs[0] = value_to_lisp (func);