From 95ba7bc6afb98c9337779b5d7ce5822bd90d3c31 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 15 Nov 2019 18:28:35 +0000 Subject: [PATCH] rand.c: Some gratuitous reformatting. --- rand.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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)); -- 2.11.0