]> git.eshelyaron.com Git - emacs.git/commitdiff
Use 'max' macro in clip_to_bounds
authorStefan Kangas <stefankangas@gmail.com>
Mon, 20 Jan 2025 13:05:37 +0000 (14:05 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 20 Jan 2025 18:51:30 +0000 (19:51 +0100)
* src/lisp.h (clip_to_bounds): Use 'max' macro.

(cherry picked from commit b568ff418ce7147c27d7f82fe4a8eef325b9de2c)

src/lisp.h

index 0ac1e1933fdd42a997fab789e5db3212db822b24..8b870119315e6f4d5ef880b6728aa4527759458c 100644 (file)
@@ -1361,7 +1361,7 @@ EQ (Lisp_Object x, Lisp_Object y)
 INLINE intmax_t
 clip_to_bounds (intmax_t lower, intmax_t num, intmax_t upper)
 {
-  return num < lower ? lower : min (num, upper);
+  return max (lower, min (num, upper));
 }
 \f
 /* Construct a Lisp_Object from a value or address.  */