From 4d2c26a42836304e987322d54f413bc37e50f25e Mon Sep 17 00:00:00 2001 From: Ben Edgington Date: Fri, 5 Feb 2021 13:54:04 +0000 Subject: [PATCH] Add missing return statements --- src/poly.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/poly.c b/src/poly.c index 0f18dc9..73f5b4a 100644 --- a/src/poly.c +++ b/src/poly.c @@ -36,9 +36,12 @@ void poly_eval(blst_fr *out, const poly *p, const blst_fr *x) { if (p->length == 0) { fr_from_uint64(out, 0); + return; } + if (fr_is_zero(x)) { *out = p->coeffs[0]; + return; } // Horner's method