Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: crypto/signature_creator_mac.cc

Issue 7206066: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | crypto/signature_verifier_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crypto/signature_creator.h" 5 #include "crypto/signature_creator.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 19 matching lines...) Expand all
30 30
31 crtn = CSSM_SignDataInit(result->sig_handle_); 31 crtn = CSSM_SignDataInit(result->sig_handle_);
32 if (crtn) { 32 if (crtn) {
33 NOTREACHED(); 33 NOTREACHED();
34 return NULL; 34 return NULL;
35 } 35 }
36 36
37 return result.release(); 37 return result.release();
38 } 38 }
39 39
40 SignatureCreator::SignatureCreator() : sig_handle_(0) { 40 SignatureCreator::SignatureCreator() : key_(NULL), sig_handle_(0) {
41 EnsureCSSMInit(); 41 EnsureCSSMInit();
42 } 42 }
43 43
44 SignatureCreator::~SignatureCreator() { 44 SignatureCreator::~SignatureCreator() {
45 CSSM_RETURN crtn; 45 CSSM_RETURN crtn;
46 if (sig_handle_) { 46 if (sig_handle_) {
47 crtn = CSSM_DeleteContext(sig_handle_); 47 crtn = CSSM_DeleteContext(sig_handle_);
48 DCHECK_EQ(CSSM_OK, crtn); 48 DCHECK_EQ(CSSM_OK, crtn);
49 } 49 }
50 } 50 }
(...skipping 14 matching lines...) Expand all
65 if (crtn) { 65 if (crtn) {
66 NOTREACHED(); 66 NOTREACHED();
67 return false; 67 return false;
68 } 68 }
69 69
70 signature->assign(sig->Data, sig->Data + sig->Length); 70 signature->assign(sig->Data, sig->Data + sig->Length);
71 return true; 71 return true;
72 } 72 }
73 73
74 } // namespace crypto 74 } // namespace crypto
OLDNEW
« no previous file with comments | « no previous file | crypto/signature_verifier_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698