Skip to content
Snippets Groups Projects
Commit f358a0aa authored by craig.schlenter@chromium.org's avatar craig.schlenter@chromium.org
Browse files

Explicitly compare to NULL when looking for weak_import symbols.

Changing the comparison form affects the warning messages
generated in various circumstances. See the codereview for
details.

Also, Apple docs claim that !symbol comparisons will not work.

Spotted by Matthew Vosburgh.

Review URL: http://codereview.chromium.org/214012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26569 0039d316-1c4b-4281-b951-d872f2087c98
parent d8a5be2c
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,7 @@ void DebugUtil::BreakDebugger() {
StackTrace::StackTrace() {
#if defined(OS_MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
if (!backtrace) {
if (backtrace == NULL) {
count_ = 0;
return;
}
......@@ -133,7 +133,7 @@ StackTrace::StackTrace() {
void StackTrace::PrintBacktrace() {
#if defined(OS_MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
if (!backtrace_symbols_fd)
if (backtrace_symbols_fd == NULL)
return;
#endif
fflush(stderr);
......@@ -142,7 +142,7 @@ void StackTrace::PrintBacktrace() {
void StackTrace::OutputToStream(std::ostream* os) {
#if defined(OS_MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
if (!backtrace_symbols)
if (backtrace_symbols == NULL)
return;
#endif
scoped_ptr_malloc<char*> trace_symbols(backtrace_symbols(trace_, count_));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment