Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/shared/Communication.cpp

Issue 6237450183639040: Issue 1283 - wrong usage of memset, fix sizeof, make proper initializing (Closed)
Patch Set: Created Sept. 1, 2014, 11:52 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/plugin/PluginSystem.cpp ('K') | « src/plugin/PluginSystem.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/Communication.cpp
===================================================================
--- a/src/shared/Communication.cpp
+++ b/src/shared/Communication.cpp
@@ -211,7 +211,7 @@
if (mode == MODE_CREATE)
{
SECURITY_ATTRIBUTES securityAttributes = {};
- securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES);
+ securityAttributes.nLength = sizeof(securityAttributes);
securityAttributes.bInheritHandle = TRUE;
std::tr1::shared_ptr<SECURITY_DESCRIPTOR> sharedSecurityDescriptor; // Just to simplify cleanup
@@ -265,7 +265,7 @@
Communication::InputBuffer Communication::Pipe::ReadMessage()
{
std::stringstream stream;
- std::auto_ptr<char> buffer(new char[bufferSize]);
+ std::unique_ptr<char[]> buffer(new char[bufferSize]);
bool doneReading = false;
while (!doneReading)
{
« src/plugin/PluginSystem.cpp ('K') | « src/plugin/PluginSystem.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld