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

Unified Diff: src/shared/Communication.cpp

Issue 5163581322559488: Issue 1283 - wrong usage of memset, fix sizeof, make proper initializing (Closed)
Patch Set: remove intializating call Created Oct. 13, 2014, 9:47 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