ref: a090f5f5efa78bb496bd9f033903f842250dc7f3
parent: 2923f85445c8092257d1f26503839bbbb5c5dac5
author: cinap_lenrek <[email protected]>
date: Fri Feb 19 08:12:01 EST 2016
libauthsrv: convert anonymous struct members
--- a/libauthsrv/authpak.c
+++ b/libauthsrv/authpak.c
@@ -14,7 +14,7 @@
typedef struct PAKcurve PAKcurve;
struct PAKcurve
{
- Lock;
+ Lock lk;
mpint *P;
mpint *A;
mpint *D;
@@ -27,7 +27,7 @@
{
static PAKcurve a;
- lock(&a);
+ lock(&a.lk);
if(a.P == nil){
a.P = mpnew(0);
a.A = mpnew(0);
@@ -37,7 +37,7 @@
ed448_curve(a.P, a.A, a.D, a.X, a.Y);
a.P = mpfield(a.P);
}
- unlock(&a);
+ unlock(&a.lk);
return &a;
}