From 8817cd79b2a856a09089752a9393080b65a00012 Mon Sep 17 00:00:00 2001 From: hasufell Date: Wed, 30 Apr 2014 17:22:57 +0200 Subject: [PATCH] POLY: use break instead of goto --- src/poly.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/poly.c b/src/poly.c index b945470..6010c8a 100644 --- a/src/poly.c +++ b/src/poly.c @@ -410,7 +410,7 @@ bool pb_inverse_poly_q(pb_poly * const a, } if (get_degree(f) == 0) - goto OUT_OF_LOOP_Q; + break; if (get_degree(f) < get_degree(g)) { pb_exch(f, g); @@ -421,7 +421,6 @@ bool pb_inverse_poly_q(pb_poly * const a, pb_xor(b, c, b, ctx->N); } -OUT_OF_LOOP_Q: k = k % ctx->N; /* Fq(x) = x^(N-k) * b(x) */ @@ -504,7 +503,7 @@ bool pb_inverse_poly_p(pb_poly *a, } if (get_degree(f) == 0) - goto OUT_OF_LOOP_P; + break; if (get_degree(f) < get_degree(g)) { /* exchange f and g and exchange b and c */ @@ -546,7 +545,6 @@ bool pb_inverse_poly_p(pb_poly *a, } } -OUT_OF_LOOP_P: k = k % ctx->N; /* Fp(x) = x^(N-k) * b(x) */