From: Mark Wooding Date: Sat, 11 Feb 2006 20:00:12 +0000 (+0000) Subject: dh-limlee: Make code return PGEN_ABORT on error, like the comments say. X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/commitdiff_plain/9f05f5d854797e4f45abb1654ec820df0dfb9699 dh-limlee: Make code return PGEN_ABORT on error, like the comments say. The documentation says it returns PGEN_ABORT on error, but it doesn't: it returns PGEN_FAIL instead. Since PGEN_ABORT is -1, it makes sense to do what the comments say, so make it do that. --- diff --git a/dh-limlee.c b/dh-limlee.c index dd11d26..3787305 100644 --- a/dh-limlee.c +++ b/dh-limlee.c @@ -81,7 +81,7 @@ int dh_limlee(dh_param *dp, unsigned ql, unsigned pl, if ((dp->p = limlee("p", MP_NEW, MP_NEW, ql, pl, r, steps, oev, oec, iev, iec, &nff, &ff)) == 0) - return (PGEN_FAIL); + return (PGEN_ABORT); /* --- Now find a primitive element --- */ @@ -132,7 +132,7 @@ int dh_limlee(dh_param *dp, unsigned ql, unsigned pl, if (!dp->g) { mp_drop(dp->p); mp_drop(dp->q); - return (PGEN_FAIL); + return (PGEN_ABORT); } return (PGEN_DONE); }