summary refs log tree commit diff
path: root/crypto/src/math/ec/ECPoint.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/math/ec/ECPoint.cs')
-rw-r--r--crypto/src/math/ec/ECPoint.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/src/math/ec/ECPoint.cs b/crypto/src/math/ec/ECPoint.cs
index ee7cf9a92..4607c8cfe 100644
--- a/crypto/src/math/ec/ECPoint.cs
+++ b/crypto/src/math/ec/ECPoint.cs
@@ -12,7 +12,7 @@ namespace Org.BouncyCastle.Math.EC
      */
     public abstract class ECPoint
     {
-        protected static ECFieldElement[] EMPTY_ZS = new ECFieldElement[0];
+        protected static readonly ECFieldElement[] EMPTY_ZS = new ECFieldElement[0];
 
         protected static ECFieldElement[] GetInitialZCoords(ECCurve curve)
         {
@@ -487,11 +487,7 @@ namespace Org.BouncyCastle.Math.EC
 
             public PreCompInfo Precompute(PreCompInfo existing)
             {
-                ValidityPreCompInfo info = existing as ValidityPreCompInfo;
-                if (info == null)
-                {
-                    info = new ValidityPreCompInfo();
-                }
+                ValidityPreCompInfo info = existing as ValidityPreCompInfo ?? new ValidityPreCompInfo();
 
                 if (info.HasFailed())
                     return info;