summaryrefslogtreecommitdiff
path: root/src/kqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kqueue.c')
-rw-r--r--src/kqueue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kqueue.c b/src/kqueue.c
index 655bfd58d3b..43e75cac310 100644
--- a/src/kqueue.c
+++ b/src/kqueue.c
@@ -395,11 +395,12 @@ only when the upper directory of the renamed file is watched. */)
maxfd = 256;
/* We assume 50 file descriptors are sufficient for the rest of Emacs. */
- if ((maxfd - 50) < XFIXNUM (Flength (watch_list)))
+ ptrdiff_t watch_list_len = list_length (watch_list);
+ if (maxfd - 50 < watch_list_len)
xsignal2
(Qfile_notify_error,
build_string ("File watching not possible, no file descriptor left"),
- Flength (watch_list));
+ make_fixnum (watch_list_len));
if (kqueuefd < 0)
{