summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-06-27 12:31:27 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-06-27 12:35:09 -0700
commit06d2eb33e1d189eee8d89cb5159f779e1600c4f2 (patch)
tree9b3e12a395e5dcf578f7604605e1c547ed6fe237 /src/textprop.c
parentf59a3f3d61c7da8a22ddb13185ae2271865ae155 (diff)
downloademacs-06d2eb33e1d189eee8d89cb5159f779e1600c4f2.tar.gz
Omit a few minor unnecessary range checks
Based on Pip Cet’s review (Bug#36370#19). * src/fileio.c (Fdo_auto_save): * src/image.c (lookup_image): * src/textprop.c (Fnext_single_char_property_change): Prefer XFIXNUM to XFIXNAT for clarity and consistency with neighboring code, and to avoid unnecessary range checks. * src/image.c (lookup_image): Omit unnecessary range checks.
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 3026ec7e992..9023f4efa06 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -799,10 +799,10 @@ last valid position in OBJECT. */)
else
CHECK_FIXNUM_COERCE_MARKER (limit);
- if (XFIXNAT (position) >= XFIXNUM (limit))
+ if (XFIXNUM (position) >= XFIXNUM (limit))
{
position = limit;
- if (XFIXNAT (position) > ZV)
+ if (XFIXNUM (position) > ZV)
XSETFASTINT (position, ZV);
}
else