Skip to content

Commit 127062d

Browse files
author
Mariusz Borsa
committed
[Sanitizers][Darwin][NFC] Apply PR feedback
Fix 2 nits rdar://143903403
1 parent b81df5e commit 127062d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,14 @@ static const load_command *NextCommand(const load_command *lc) {
335335
}
336336

337337
# ifdef MH_MAGIC_64
338-
static const size_t header_size = sizeof(mach_header_64);
338+
static constexpr size_t header_size = sizeof(mach_header_64);
339339
# else
340-
static const size_t header_size = sizeof(mach_header);
340+
static constexpr size_t header_size = sizeof(mach_header);
341341
# endif
342342

343343
static void FindUUID(const load_command *first_lc, const mach_header *hdr,
344344
u8 *uuid_output) {
345-
unsigned short curcmd = 0;
345+
uint32_t curcmd = 0;
346346
for (const load_command *lc = first_lc; curcmd < hdr->ncmds;
347347
curcmd++, lc = NextCommand(lc)) {
348348
CHECK_LT((const char *)lc,
@@ -360,7 +360,7 @@ static void FindUUID(const load_command *first_lc, const mach_header *hdr,
360360

361361
static bool IsModuleInstrumented(const load_command *first_lc,
362362
const mach_header *hdr) {
363-
unsigned short curcmd = 0;
363+
uint32_t curcmd = 0;
364364
for (const load_command *lc = first_lc; curcmd < hdr->ncmds;
365365
curcmd++, lc = NextCommand(lc)) {
366366
CHECK_LT((const char *)lc,

0 commit comments

Comments
 (0)