aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index d916a695155..b19a8368aec 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2248,7 +2248,7 @@ init_random (void)
2248 /* FIXME: Perhaps getrandom can be used here too? */ 2248 /* FIXME: Perhaps getrandom can be used here too? */
2249 success = w32_init_random (&v, sizeof v) == 0; 2249 success = w32_init_random (&v, sizeof v) == 0;
2250#else 2250#else
2251 verify (sizeof v <= 256); 2251 static_assert (sizeof v <= 256);
2252 success = getrandom (&v, sizeof v, 0) == sizeof v; 2252 success = getrandom (&v, sizeof v, 0) == sizeof v;
2253#endif 2253#endif
2254 2254
@@ -2742,16 +2742,16 @@ emacs_fchmodat (int fd, const char *path, mode_t mode, int flags)
2742#ifndef SSIZE_MAX 2742#ifndef SSIZE_MAX
2743# define SSIZE_MAX TYPE_MAXIMUM (ssize_t) 2743# define SSIZE_MAX TYPE_MAXIMUM (ssize_t)
2744#endif 2744#endif
2745verify (MAX_RW_COUNT <= PTRDIFF_MAX); 2745static_assert (MAX_RW_COUNT <= PTRDIFF_MAX);
2746verify (MAX_RW_COUNT <= SIZE_MAX); 2746static_assert (MAX_RW_COUNT <= SIZE_MAX);
2747verify (MAX_RW_COUNT <= SSIZE_MAX); 2747static_assert (MAX_RW_COUNT <= SSIZE_MAX);
2748 2748
2749#ifdef WINDOWSNT 2749#ifdef WINDOWSNT
2750/* Verify that Emacs read requests cannot cause trouble, even in 2750/* Verify that Emacs read requests cannot cause trouble, even in
2751 64-bit builds. The last argument of 'read' is 'unsigned int', and 2751 64-bit builds. The last argument of 'read' is 'unsigned int', and
2752 the return value's type (see 'sys_read') is 'int'. */ 2752 the return value's type (see 'sys_read') is 'int'. */
2753verify (MAX_RW_COUNT <= INT_MAX); 2753static_assert (MAX_RW_COUNT <= INT_MAX);
2754verify (MAX_RW_COUNT <= UINT_MAX); 2754static_assert (MAX_RW_COUNT <= UINT_MAX);
2755#endif 2755#endif
2756 2756
2757/* Read from FD to a buffer BUF with size NBYTE. 2757/* Read from FD to a buffer BUF with size NBYTE.