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

Unified Diff: sandbox/win/src/sandbox_nt_util.cc

Issue 1475803002: Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: cloud print Created 5 years 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 | « sandbox/win/src/sandbox_nt_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sandbox_nt_util.cc
diff --git a/sandbox/win/src/sandbox_nt_util.cc b/sandbox/win/src/sandbox_nt_util.cc
index 2b2a3bae0f7c85838f88d847b7cb7a3717605bdf..82de75cae822f89598d4b7ab3d50b7c4d660a97f 100644
--- a/sandbox/win/src/sandbox_nt_util.cc
+++ b/sandbox/win/src/sandbox_nt_util.cc
@@ -290,7 +290,8 @@ NTSTATUS AllocAndGetFullPath(HANDLE root,
// Hacky code... replace with AllocAndCopyObjectAttributes.
NTSTATUS AllocAndCopyName(const OBJECT_ATTRIBUTES* in_object,
- wchar_t** out_name, uint32* attributes,
+ wchar_t** out_name,
+ uint32_t* attributes,
HANDLE* root) {
if (!InitHeap())
return STATUS_NO_MEMORY;
@@ -433,7 +434,7 @@ UNICODE_STRING* AnsiToUnicode(const char* string) {
return out_string;
}
-UNICODE_STRING* GetImageInfoFromModule(HMODULE module, uint32* flags) {
+UNICODE_STRING* GetImageInfoFromModule(HMODULE module, uint32_t* flags) {
// PEImage's dtor won't be run during SEH unwinding, but that's OK.
#pragma warning(push)
#pragma warning(disable: 4509)
@@ -529,7 +530,7 @@ UNICODE_STRING* ExtractModuleName(const UNICODE_STRING* module_path) {
// Based on the code above, size_bytes should always be small enough
// to make the static_cast below safe.
- DCHECK_NT(kuint16max > size_bytes);
+ DCHECK_NT(UINT16_MAX > size_bytes);
char* str_buffer = new(NT_ALLOC) char[size_bytes + sizeof(UNICODE_STRING)];
if (!str_buffer)
return NULL;
@@ -585,8 +586,9 @@ NTSTATUS AutoProtectMemory::RevertProtection() {
return ret;
}
-bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info, DWORD length,
- uint32 file_info_class) {
+bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info,
+ DWORD length,
+ uint32_t file_info_class) {
if (FileRenameInformation != file_info_class)
return false;
@@ -606,7 +608,7 @@ bool IsSupportedRenameCall(FILE_RENAME_INFORMATION* file_info, DWORD length,
// Check if it starts with \\??\\. We don't support relative paths.
if (file_info->FileNameLength < sizeof(kPathPrefix) ||
- file_info->FileNameLength > kuint16max)
+ file_info->FileNameLength > UINT16_MAX)
return false;
if (file_info->FileName[0] != kPathPrefix[0] ||
« no previous file with comments | « sandbox/win/src/sandbox_nt_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698