From b2aef8122ad1404854728615ca03a7f3cd3f93a3 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sun, 9 Jul 2017 13:43:45 +0200 Subject: [PATCH] ; * src/emacs-module.c (module_assert_thread): Simplify. --- src/emacs-module.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/emacs-module.c b/src/emacs-module.c index b80aa23abce..c5e56b1344c 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -817,11 +817,13 @@ in_current_thread (void) static void module_assert_thread (void) { - if (! module_assertions || (in_current_thread () && ! gc_in_progress)) + if (!module_assertions) return; - module_abort (gc_in_progress ? - "Module function called during garbage collection" : - "Module function called from outside the current Lisp thread"); + if (!in_current_thread ()) + module_abort ("Module function called from outside " + "the current Lisp thread"); + if (gc_in_progress) + module_abort ("Module function called during garbage collection"); } static void -- 2.39.2