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

Unified Diff: courgette/courgette_tool.cc

Issue 155820: Coverity fixes to keep coverity quiet.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « courgette/courgette_minimal_tool.cc ('k') | courgette/encoded_program.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/courgette_tool.cc
===================================================================
--- courgette/courgette_tool.cc (revision 21139)
+++ courgette/courgette_tool.cc (working copy)
@@ -217,16 +217,17 @@
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);
« no previous file with comments | « courgette/courgette_minimal_tool.cc ('k') | courgette/encoded_program.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698