summaryrefslogtreecommitdiff
path: root/src/floatfns.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-01-01 23:57:00 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-01-01 23:57:00 -0800
commit71376d4b88555139065d6ac862734d7e5c14f043 (patch)
tree3079cf158ae8bc628f53ae686e47cffc1f722953 /src/floatfns.c
parent87e65f9680dd7c944d8c2bfac87d82db098740a6 (diff)
downloademacs-71376d4b88555139065d6ac862734d7e5c14f043.tar.gz
emacs-71376d4b88555139065d6ac862734d7e5c14f043.tar.bz2
emacs-71376d4b88555139065d6ac862734d7e5c14f043.zip
Simplify via eabs.
* dired.c (file_name_completion): * doc.c (get_doc_string): * floatfns.c (round2): * font.c (font_score, font_delete_unmatched): * fringe.c (compute_fringe_widths): * lread.c (read_list): * minibuf.c (Ftry_completion): * term.c (tty_ins_del_lines): * xterm.c (x_draw_image_foreground, x_draw_image_foreground_1): Use eabs (x) rather than open-coding it as (x < 0 ? -x : x).
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index 645a5957609..16d6d2382b8 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -399,8 +399,8 @@ round2 (EMACS_INT i1, EMACS_INT i2)
odd. */
EMACS_INT q = i1 / i2;
EMACS_INT r = i1 % i2;
- EMACS_INT abs_r = r < 0 ? -r : r;
- EMACS_INT abs_r1 = (i2 < 0 ? -i2 : i2) - abs_r;
+ EMACS_INT abs_r = eabs (r);
+ EMACS_INT abs_r1 = eabs (i2) - abs_r;
return q + (abs_r + (q & 1) <= abs_r1 ? 0 : (i2 ^ r) < 0 ? -1 : 1);
}