From: Mark Wooding Date: Fri, 15 Nov 2019 18:28:35 +0000 (+0000) Subject: rand.c: Some gratuitous reformatting. X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/commitdiff_plain/3eeb159847c61080d100b71a8d8e2134cf82886e rand.c: Some gratuitous reformatting. --- diff --git a/rand.c b/rand.c index 675bf70..6c6abdb 100644 --- a/rand.c +++ b/rand.c @@ -103,15 +103,12 @@ static PyObject *grmeth_range(PyObject *me, PyObject *arg) if (grand_check(me)) return (0); if (PyInt_Check(m)) { long mm = PyInt_AS_LONG(m); - if (mm <= 0) - goto notpos; - if (mm <= 0xffffffff) + if (mm <= 0) goto notpos; + else if (mm <= 0xffffffff) return (PyInt_FromLong(grand_range(GRAND_R(me), mm))); } - if ((x = getmp(m)) == 0) - goto end; - if (!MP_POSP(x)) - goto notpos; + if ((x = getmp(m)) == 0) goto end; + if (!MP_POSP(x)) goto notpos; y = mprand_range(MP_NEW, x, GRAND_R(me), 0); MP_DROP(x); return (mp_pywrap(y));