diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2019-07-22 13:45:40 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2019-07-22 19:26:21 +0200 |
commit | 7e294d55e1506443e711f44c85caf490ded80fe8 (patch) | |
tree | 11549eb71f39826c4d044a3d3505ceee56084a78 /lisp/subr.el | |
parent | 87ad8a11437752f3a5f7f1096328e3b9d11bba9f (diff) | |
download | emacs-7e294d55e1506443e711f44c85caf490ded80fe8.tar.gz emacs-7e294d55e1506443e711f44c85caf490ded80fe8.tar.bz2 emacs-7e294d55e1506443e711f44c85caf490ded80fe8.zip |
Remove some obsolete integer overflow handling
* lisp/subr.el (number-sequence):
* lisp/org/org-gnus.el (org-gnus-follow-link):
* lisp/ls-lisp.el (ls-lisp-insert-directory):
Remove dead code guarding against integer overflow.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 4a1649f6019..9fd3366f8a6 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -681,14 +681,12 @@ of course, also replace TO with a slightly larger value (when (zerop inc) (error "The increment can not be zero")) (let (seq (n 0) (next from) (last from)) (if (> inc 0) - ;; The (>= next last) condition protects against integer - ;; overflow in computing NEXT. - (while (and (>= next last) (<= next to)) + (while (<= next to) (setq seq (cons next seq) n (1+ n) last next next (+ from (* n inc)))) - (while (and (<= next last) (>= next to)) + (while (>= next to) (setq seq (cons next seq) n (1+ n) next (+ from (* n inc))))) |