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

Side by Side Diff: sandbox/win/src/sync_policy.cc

Issue 2918583003: Fix BOOLEAN truncation warning in sync_policy.cc. (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « no previous file | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "sandbox/win/src/sync_policy.h" 9 #include "sandbox/win/src/sync_policy.h"
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return status; 188 return status;
189 189
190 UNICODE_STRING unicode_event_name = {}; 190 UNICODE_STRING unicode_event_name = {};
191 OBJECT_ATTRIBUTES object_attributes = {}; 191 OBJECT_ATTRIBUTES object_attributes = {};
192 InitObjectAttribs(event_name, OBJ_CASE_INSENSITIVE, object_directory, 192 InitObjectAttribs(event_name, OBJ_CASE_INSENSITIVE, object_directory,
193 &object_attributes, &unicode_event_name, NULL); 193 &object_attributes, &unicode_event_name, NULL);
194 194
195 HANDLE local_handle = NULL; 195 HANDLE local_handle = NULL;
196 status = NtCreateEvent(&local_handle, EVENT_ALL_ACCESS, &object_attributes, 196 status = NtCreateEvent(&local_handle, EVENT_ALL_ACCESS, &object_attributes,
197 static_cast<EVENT_TYPE>(event_type), 197 static_cast<EVENT_TYPE>(event_type),
198 static_cast<BOOLEAN>(initial_state)); 198 static_cast<BOOLEAN>(initial_state != 0));
199 if (NULL == local_handle) 199 if (NULL == local_handle)
200 return status; 200 return status;
201 201
202 if (!::DuplicateHandle(::GetCurrentProcess(), local_handle, 202 if (!::DuplicateHandle(::GetCurrentProcess(), local_handle,
203 client_info.process, handle, 0, FALSE, 203 client_info.process, handle, 0, FALSE,
204 DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) { 204 DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) {
205 return STATUS_ACCESS_DENIED; 205 return STATUS_ACCESS_DENIED;
206 } 206 }
207 return status; 207 return status;
208 } 208 }
(...skipping 28 matching lines...) Expand all
237 237
238 if (!::DuplicateHandle(::GetCurrentProcess(), local_handle, 238 if (!::DuplicateHandle(::GetCurrentProcess(), local_handle,
239 client_info.process, handle, 0, FALSE, 239 client_info.process, handle, 0, FALSE,
240 DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) { 240 DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) {
241 return STATUS_ACCESS_DENIED; 241 return STATUS_ACCESS_DENIED;
242 } 242 }
243 return status; 243 return status;
244 } 244 }
245 245
246 } // namespace sandbox 246 } // namespace sandbox
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698