[PATCH] D121856: [scudo] Use nullptr instead of integer-to-pointer cast
Dominic Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 14:11:41 PDT 2022
ddcc created this revision.
ddcc added reviewers: vitalybuka, eugenis, cryptoad, mcgrathr, hctim.
Herald added a project: All.
ddcc requested review of this revision.
Herald added a project: Sanitizers.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121856
Files:
compiler-rt/lib/scudo/standalone/combined.h
Index: compiler-rt/lib/scudo/standalone/combined.h
===================================================================
--- compiler-rt/lib/scudo/standalone/combined.h
+++ compiler-rt/lib/scudo/standalone/combined.h
@@ -1271,8 +1271,8 @@
}
static const size_t NumErrorReports =
- sizeof(((scudo_error_info *)0)->reports) /
- sizeof(((scudo_error_info *)0)->reports[0]);
+ sizeof(((scudo_error_info *)nullptr)->reports) /
+ sizeof(((scudo_error_info *)nullptr)->reports[0]);
static void getInlineErrorInfo(struct scudo_error_info *ErrorInfo,
size_t &NextErrorReport, uintptr_t FaultAddr,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121856.415980.patch
Type: text/x-patch
Size: 653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220316/a6e392fb/attachment.bin>
More information about the llvm-commits
mailing list