File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -860,10 +860,11 @@ static VALUE ossl_ec_group_eql(VALUE a, VALUE b)
860860 GetECGroup (a , group1 );
861861 GetECGroup (b , group2 );
862862
863- if (EC_GROUP_cmp (group1 , group2 , ossl_bn_ctx ) == 1 )
864- return Qfalse ;
865-
866- return Qtrue ;
863+ switch (EC_GROUP_cmp (group1 , group2 , ossl_bn_ctx )) {
864+ case 0 : return Qtrue ;
865+ case 1 : return Qfalse ;
866+ default : ossl_raise (eEC_GROUP , "EC_GROUP_cmp" );
867+ }
867868}
868869
869870/*
@@ -1424,10 +1425,13 @@ static VALUE ossl_ec_point_eql(VALUE a, VALUE b)
14241425 GetECPoint (b , point2 );
14251426 GetECGroup (group_v1 , group );
14261427
1427- if (EC_POINT_cmp (group , point1 , point2 , ossl_bn_ctx ) == 1 )
1428- return Qfalse ;
1428+ switch (EC_POINT_cmp (group , point1 , point2 , ossl_bn_ctx )) {
1429+ case 0 : return Qtrue ;
1430+ case 1 : return Qfalse ;
1431+ default : ossl_raise (eEC_POINT , "EC_POINT_cmp" );
1432+ }
14291433
1430- return Qtrue ;
1434+ UNREACHABLE ;
14311435}
14321436
14331437/*
You can’t perform that action at this time.
0 commit comments