diff options
author | Vedant Kumar <vsk@apple.com> | 2015-09-30 23:52:54 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2015-09-30 23:52:54 +0000 |
commit | 98379eaa5baabd991a6c353cbdd61b539bb369b4 (patch) | |
tree | 38259aab6fdd67c9c34bed58e4fe4c928be3a628 /lib/sanitizer_common/sanitizer_printf.cc | |
parent | c200e295a78c50db3caeafea82d1b73a021d781a (diff) |
[sanitizer_common] Apply modernize-use-nullptr, other minor fixes
- Trim spaces.
- Use nullptr in place of 0 for pointer variables.
- Use '!p' in place of 'p == 0' for null pointer checks.
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D13310
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248964 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_printf.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_printf.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/sanitizer_common/sanitizer_printf.cc b/lib/sanitizer_common/sanitizer_printf.cc index 852cdd4b2..5f4725ec1 100644 --- a/lib/sanitizer_common/sanitizer_printf.cc +++ b/lib/sanitizer_common/sanitizer_printf.cc @@ -14,7 +14,6 @@ // inside it. //===----------------------------------------------------------------------===// - #include "sanitizer_common.h" #include "sanitizer_flags.h" #include "sanitizer_libc.h" @@ -98,7 +97,7 @@ static int AppendSignedDecimal(char **buff, const char *buff_end, s64 num, static int AppendString(char **buff, const char *buff_end, int precision, const char *s) { - if (s == 0) + if (!s) s = "<null>"; int result = 0; for (; *s; s++) { @@ -329,4 +328,4 @@ void InternalScopedString::append(const char *format, ...) { CHECK_LT(length_, size()); } -} // namespace __sanitizer +} // namespace __sanitizer |