diff options
author | sra@chromium.org <sra@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 01:30:06 +0000 |
---|---|---|
committer | sra@chromium.org <sra@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 01:30:06 +0000 |
commit | d38c3a28213b3a2bc62df703c231eebf0bb5dbf4 (patch) | |
tree | f621cc23ae43d38cce013c5a795e35a043c4bc34 /courgette/courgette_tool.cc | |
parent | 31856be711996fc573ca6203db7512ab6089899d (diff) | |
download | chromium_src-d38c3a28213b3a2bc62df703c231eebf0bb5dbf4.zip chromium_src-d38c3a28213b3a2bc62df703c231eebf0bb5dbf4.tar.gz chromium_src-d38c3a28213b3a2bc62df703c231eebf0bb5dbf4.tar.bz2 |
Coverity fixes to keep coverity quiet.
Only the first issue is remotely interesting.
* Possibility (low) of using NULL SinkStream* courgette tool 'gen1a' command.
* Added initializers for all class members to several constructors.
* return 0 at end of from wmain.
BUG=none
TEST=existing
Review URL: http://codereview.chromium.org/155820
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21253 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette/courgette_tool.cc')
-rw-r--r-- | courgette/courgette_tool.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/courgette/courgette_tool.cc b/courgette/courgette_tool.cc index 47b2dc6..91f02aa6 100644 --- a/courgette/courgette_tool.cc +++ b/courgette/courgette_tool.cc @@ -217,16 +217,17 @@ void DisassembleAdjustDiff(const std::wstring& model_file, Problem("Can't serialize encoded model."); courgette::DeleteEncodedProgram(encoded_model); + courgette::SinkStream empty_sink; for (int i = 0; ; ++i) { courgette::SinkStream* old_stream = model_sinks.stream(i); courgette::SinkStream* new_stream = program_sinks.stream(i); - if (old_stream == NULL && new_stream == NULL) + if (old_stream == NULL && new_stream == NULL) break; courgette::SourceStream old_source; courgette::SourceStream new_source; - old_source.Init(*old_stream); - new_source.Init(*new_stream); + old_source.Init(old_stream ? *old_stream : empty_sink); + new_source.Init(new_stream ? *new_stream : empty_sink); courgette::SinkStream patch_stream; courgette::BSDiffStatus status = courgette::CreateBinaryPatch(&old_source, &new_source, &patch_stream); |