POLY: use break instead of goto
This commit is contained in:
parent
afa06ce0b9
commit
8817cd79b2
@ -410,7 +410,7 @@ bool pb_inverse_poly_q(pb_poly * const a,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (get_degree(f) == 0)
|
if (get_degree(f) == 0)
|
||||||
goto OUT_OF_LOOP_Q;
|
break;
|
||||||
|
|
||||||
if (get_degree(f) < get_degree(g)) {
|
if (get_degree(f) < get_degree(g)) {
|
||||||
pb_exch(f, 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);
|
pb_xor(b, c, b, ctx->N);
|
||||||
}
|
}
|
||||||
|
|
||||||
OUT_OF_LOOP_Q:
|
|
||||||
k = k % ctx->N;
|
k = k % ctx->N;
|
||||||
|
|
||||||
/* Fq(x) = x^(N-k) * b(x) */
|
/* Fq(x) = x^(N-k) * b(x) */
|
||||||
@ -504,7 +503,7 @@ bool pb_inverse_poly_p(pb_poly *a,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (get_degree(f) == 0)
|
if (get_degree(f) == 0)
|
||||||
goto OUT_OF_LOOP_P;
|
break;
|
||||||
|
|
||||||
if (get_degree(f) < get_degree(g)) {
|
if (get_degree(f) < get_degree(g)) {
|
||||||
/* exchange f and g and exchange b and c */
|
/* 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;
|
k = k % ctx->N;
|
||||||
|
|
||||||
/* Fp(x) = x^(N-k) * b(x) */
|
/* Fp(x) = x^(N-k) * b(x) */
|
||||||
|
Loading…
Reference in New Issue
Block a user