diff options
| author | Paul Eggert | 2019-06-27 12:31:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-06-27 12:35:09 -0700 |
| commit | 06d2eb33e1d189eee8d89cb5159f779e1600c4f2 (patch) | |
| tree | 9b3e12a395e5dcf578f7604605e1c547ed6fe237 /src/textprop.c | |
| parent | f59a3f3d61c7da8a22ddb13185ae2271865ae155 (diff) | |
| download | emacs-06d2eb33e1d189eee8d89cb5159f779e1600c4f2.tar.gz emacs-06d2eb33e1d189eee8d89cb5159f779e1600c4f2.zip | |
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.c | 4 |
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. */) | |||
| 799 | else | 799 | else |
| 800 | CHECK_FIXNUM_COERCE_MARKER (limit); | 800 | CHECK_FIXNUM_COERCE_MARKER (limit); |
| 801 | 801 | ||
| 802 | if (XFIXNAT (position) >= XFIXNUM (limit)) | 802 | if (XFIXNUM (position) >= XFIXNUM (limit)) |
| 803 | { | 803 | { |
| 804 | position = limit; | 804 | position = limit; |
| 805 | if (XFIXNAT (position) > ZV) | 805 | if (XFIXNUM (position) > ZV) |
| 806 | XSETFASTINT (position, ZV); | 806 | XSETFASTINT (position, ZV); |
| 807 | } | 807 | } |
| 808 | else | 808 | else |