mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Remove some old dead code. Fix some Clang warnings in SRP (ng->N... will
always evaluate to true.
This commit is contained in:
parent
2eb329cc63
commit
aab7c83d02
4 changed files with 2 additions and 241 deletions
|
@ -172,7 +172,7 @@ static NGConstant *new_ng( SRP_NGType ng_type, const char *n_hex, const char *g_
|
|||
mpz_init(ng->N);
|
||||
mpz_init(ng->g);
|
||||
|
||||
if (!ng || !ng->N || !ng->g)
|
||||
if (!ng)
|
||||
return 0;
|
||||
|
||||
if (ng_type != SRP_NG_CUSTOM) {
|
||||
|
@ -823,7 +823,7 @@ struct SRPUser *srp_user_new(SRP_HashAlgorithm alg, SRP_NGType ng_type,
|
|||
mpz_init(usr->A);
|
||||
mpz_init(usr->S);
|
||||
|
||||
if (!usr->ng || !usr->a || !usr->A || !usr->S)
|
||||
if (!usr->ng)
|
||||
goto err_exit;
|
||||
|
||||
usr->username = (char*)malloc(ulen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue