1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-15 03:11:54 -07:00

Use mpz_sgn rather than comparisons against 0

* src/data.c (Fmod): Use mpz_sgn.
* src/lisp.h (NATNUMP): Use mpz_sgn.
This commit is contained in:
Tom Tromey 2018-08-09 13:21:45 -06:00
parent f966753727
commit f822a2516d
2 changed files with 3 additions and 3 deletions

View file

@ -3251,8 +3251,8 @@ Both X and Y must be numbers or markers. */)
mpz_mod (result, *xmp, *ymp);
/* Fix the sign if needed. */
cmpr = mpz_cmp_si (result, 0);
cmpy = mpz_cmp_si (*ymp, 0);
cmpr = mpz_sgn (result);
cmpy = mpz_sgn (*ymp);
if (cmpy < 0 ? cmpr > 0 : cmpr < 0)
mpz_add (result, result, *ymp);