summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/data.c b/src/data.c
index 6622088b648..b20d1b4c8af 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2337,13 +2337,13 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max)
uintmax_t val IF_LINT (= 0);
if (INTEGERP (c))
{
- valid = 0 <= XINT (c);
+ valid = XINT (c) >= 0;
val = XINT (c);
}
else if (FLOATP (c))
{
double d = XFLOAT_DATA (c);
- if (0 <= d
+ if (d >= 0
&& d < (max == UINTMAX_MAX ? (double) UINTMAX_MAX + 1 : max + 1))
{
val = d;