summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-04-20 19:00:31 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-04-20 19:00:31 (GMT)
commit9d3a5aeabe79879c54675b1b929447160c9c4f1c (patch)
treee567961cb0571bba3fecca12f1bbcc582cf2db2c /Modules
parent3c23a87e58ba5ba3161eaacae98a49a79e1f2786 (diff)
downloadcpython-9d3a5aeabe79879c54675b1b929447160c9c4f1c.zip
cpython-9d3a5aeabe79879c54675b1b929447160c9c4f1c.tar.gz
cpython-9d3a5aeabe79879c54675b1b929447160c9c4f1c.tar.bz2
Defensive programming: mpd_isspecial(r) already implies mpd_isspecial(q), but
this is more readable.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_decimal/libmpdec/mpdecimal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_decimal/libmpdec/mpdecimal.c b/Modules/_decimal/libmpdec/mpdecimal.c
index d6937bd..52df947 100644
--- a/Modules/_decimal/libmpdec/mpdecimal.c
+++ b/Modules/_decimal/libmpdec/mpdecimal.c
@@ -3530,6 +3530,7 @@ _mpd_qdiv(int action, mpd_t *q, const mpd_t *a, const mpd_t *b,
MPD_NEW_STATIC(r,0,0,0,0);
_mpd_base_ndivmod(q, &r, a, b, status);
if (mpd_isspecial(q) || mpd_isspecial(&r)) {
+ mpd_setspecial(q, MPD_POS, MPD_NAN);
mpd_del(&r);
goto finish;
}