Commit ffb134af authored by Michael Hamburg's avatar Michael Hamburg

minor fixes: fix unreachable code, fix an integer used in boolean context, thanks to Sofi Celi

parent bf609436
......@@ -763,7 +763,7 @@ decaf_bool_t API_NS(point_eq) ( const point_t p, const point_t q ) {
gf_mul ( b, q->y, p->x );
mask_t succ = gf_eq(a,b);
#if (COFACTOR == 8) && IMAGINE_TWIST
#if (COFACTOR == 8)
gf_mul ( a, p->y, q->y );
gf_mul ( b, q->x, p->x );
#if !(IMAGINE_TWIST)
......
......@@ -763,7 +763,7 @@ decaf_bool_t API_NS(point_eq) ( const point_t p, const point_t q ) {
gf_mul ( b, q->y, p->x );
mask_t succ = gf_eq(a,b);
#if (COFACTOR == 8) && IMAGINE_TWIST
#if (COFACTOR == 8)
gf_mul ( a, p->y, q->y );
gf_mul ( b, q->x, p->x );
#if !(IMAGINE_TWIST)
......
......@@ -318,7 +318,7 @@ public:
*/
inline explicit Point(const FixedBlock<SER_BYTES> &buffer, bool allow_identity=true)
/*throw(CryptoException)*/ {
if (DECAF_SUCCESS != decode(buffer,allow_identity ? DECAF_TRUE : DECAF_FALSE)) {
if (DECAF_SUCCESS != decode(buffer,allow_identity)) {
throw CryptoException();
}
}
......
......@@ -318,7 +318,7 @@ public:
*/
inline explicit Point(const FixedBlock<SER_BYTES> &buffer, bool allow_identity=true)
/*throw(CryptoException)*/ {
if (DECAF_SUCCESS != decode(buffer,allow_identity ? DECAF_TRUE : DECAF_FALSE)) {
if (DECAF_SUCCESS != decode(buffer,allow_identity)) {
throw CryptoException();
}
}
......
......@@ -752,7 +752,7 @@ decaf_bool_t API_NS(point_eq) ( const point_t p, const point_t q ) {
gf_mul ( b, q->y, p->x );
mask_t succ = gf_eq(a,b);
#if (COFACTOR == 8) && IMAGINE_TWIST
#if (COFACTOR == 8)
gf_mul ( a, p->y, q->y );
gf_mul ( b, q->x, p->x );
#if !(IMAGINE_TWIST)
......
......@@ -305,7 +305,7 @@ public:
*/
inline explicit Point(const FixedBlock<SER_BYTES> &buffer, bool allow_identity=true)
/*throw(CryptoException)*/ {
if (DECAF_SUCCESS != decode(buffer,allow_identity ? DECAF_TRUE : DECAF_FALSE)) {
if (DECAF_SUCCESS != decode(buffer,allow_identity)) {
throw CryptoException();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment