From aab7c83d0229c2c7aa3b60de3ca1b1a4eb326b55 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Fri, 24 Jul 2015 21:03:50 +0200 Subject: Remove some old dead code. Fix some Clang warnings in SRP (ng->N... will always evaluate to true. --- src/util/srp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/util/srp.cpp') diff --git a/src/util/srp.cpp b/src/util/srp.cpp index cc8bac6bb..6fafe8280 100644 --- a/src/util/srp.cpp +++ b/src/util/srp.cpp @@ -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); -- cgit v1.2.3