From 35ee8cc42f73898f88da03b3a607e2918b82adf2 Mon Sep 17 00:00:00 2001 From: "wtc%google.com" Date: Tue, 6 Mar 2012 02:23:25 +0000 Subject: [PATCH] Bug 732258: ssl3_FinishHandshake cleanup. Fix the unused variable compiler warning about 'rv' and simplify the conditional expression around the ss->sec.cache call. r=bsmith. git-svn-id: svn://10.0.0.236/trunk@263520 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/ssl/ssl3con.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mozilla/security/nss/lib/ssl/ssl3con.c b/mozilla/security/nss/lib/ssl/ssl3con.c index 3b0fc783777..7bbd9fc28c3 100644 --- a/mozilla/security/nss/lib/ssl/ssl3con.c +++ b/mozilla/security/nss/lib/ssl/ssl3con.c @@ -40,7 +40,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: ssl3con.c,v 1.166 2012-03-06 00:26:31 wtc%google.com Exp $ */ +/* $Id: ssl3con.c,v 1.167 2012-03-06 02:23:25 wtc%google.com Exp $ */ #include "cert.h" #include "ssl.h" @@ -8613,8 +8613,6 @@ xmit_loser: SECStatus ssl3_FinishHandshake(sslSocket * ss) { - SECStatus rv; - PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); PORT_Assert( ss->ssl3.hs.restartTarget == NULL ); @@ -8623,9 +8621,9 @@ ssl3_FinishHandshake(sslSocket * ss) ss->handshake = NULL; ss->firstHsDone = PR_TRUE; - if (ss->sec.ci.sid->cached == never_cached && - !ss->opt.noCache && ss->sec.cache && ss->ssl3.hs.cacheSID) { + if (ss->ssl3.hs.cacheSID) { (*ss->sec.cache)(ss->sec.ci.sid); + ss->ssl3.hs.cacheSID = PR_FALSE; } ss->ssl3.hs.ws = idle_handshake;