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

Side by Side Diff: util/mach/mach_message_server.cc

Issue 656703002: Convert NULL to nullptr (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Fix 80-column violations Created 6 years, 2 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 | « util/mach/exception_ports_test.cc ('k') | util/mach/symbolic_constants_mach.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 (options & MACH_SEND_TRAILER) ? (max_reply_size + MAX_TRAILER_SIZE) 113 (options & MACH_SEND_TRAILER) ? (max_reply_size + MAX_TRAILER_SIZE)
114 : max_reply_size); 114 : max_reply_size);
115 115
116 kern_return_t kr; 116 kern_return_t kr;
117 117
118 do { 118 do {
119 mach_msg_size_t this_request_alloc = request_alloc; 119 mach_msg_size_t this_request_alloc = request_alloc;
120 mach_msg_size_t this_request_size = request_size; 120 mach_msg_size_t this_request_size = request_size;
121 121
122 base::mac::ScopedMachVM request_scoper; 122 base::mac::ScopedMachVM request_scoper;
123 mach_msg_header_t* request_header = NULL; 123 mach_msg_header_t* request_header = nullptr;
124 124
125 while (!request_scoper.address()) { 125 while (!request_scoper.address()) {
126 vm_address_t request_addr; 126 vm_address_t request_addr;
127 kr = vm_allocate(mach_task_self(), 127 kr = vm_allocate(mach_task_self(),
128 &request_addr, 128 &request_addr,
129 this_request_alloc, 129 this_request_alloc,
130 VM_FLAGS_ANYWHERE | VM_MAKE_TAG(VM_MEMORY_MACH_MSG)); 130 VM_FLAGS_ANYWHERE | VM_MAKE_TAG(VM_MEMORY_MACH_MSG));
131 if (kr != KERN_SUCCESS) { 131 if (kr != KERN_SUCCESS) {
132 return kr; 132 return kr;
133 } 133 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // persistent mode, and just return success when not in persistent mode. 257 // persistent mode, and just return success when not in persistent mode.
258 return (persistent == kPersistent) ? MACH_RCV_TIMED_OUT : kr; 258 return (persistent == kPersistent) ? MACH_RCV_TIMED_OUT : kr;
259 } 259 }
260 } 260 }
261 } while (persistent == kPersistent); 261 } while (persistent == kPersistent);
262 262
263 return kr; 263 return kr;
264 } 264 }
265 265
266 } // namespace crashpad 266 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mach/exception_ports_test.cc ('k') | util/mach/symbolic_constants_mach.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698