summaryrefslogtreecommitdiffstats
path: root/base/platform_thread_mac.mm
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-21 19:27:50 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-21 19:27:50 +0000
commit109fc45253e5601dce3fdc35fea2ac1bed08a9b0 (patch)
treef31ae8798ce166cd773aaacdf43b746341726da8 /base/platform_thread_mac.mm
parent95ae24fa0b69528d039a27d11219cccb95b9550f (diff)
downloadchromium_src-109fc45253e5601dce3fdc35fea2ac1bed08a9b0.zip
chromium_src-109fc45253e5601dce3fdc35fea2ac1bed08a9b0.tar.gz
chromium_src-109fc45253e5601dce3fdc35fea2ac1bed08a9b0.tar.bz2
mac: use errno instead of return value of pthread_setname_np
It appears the return value is always -1 on error. BUG=47058 Review URL: http://codereview.chromium.org/2824018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50373 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/platform_thread_mac.mm')
-rw-r--r--base/platform_thread_mac.mm6
1 files changed, 2 insertions, 4 deletions
diff --git a/base/platform_thread_mac.mm b/base/platform_thread_mac.mm
index d155b323..428e276c 100644
--- a/base/platform_thread_mac.mm
+++ b/base/platform_thread_mac.mm
@@ -8,7 +8,6 @@
#include <dlfcn.h>
#include "base/logging.h"
-#include "base/safe_strerror_posix.h"
// A simple class that demonstrates our impressive ability to do nothing.
@interface NoOp : NSObject
@@ -63,7 +62,6 @@ void PlatformThread::SetName(const char* name) {
// hardcode it.
const int kMaxNameLength = 63;
std::string shortened_name = std::string(name).substr(0, kMaxNameLength);
- int err = dynamic_pthread_setname_np(shortened_name.c_str());
- if (err < 0)
- LOG(ERROR) << "pthread_setname_np: " << safe_strerror(err);
+ if (dynamic_pthread_setname_np(shortened_name.c_str()) < 0)
+ PLOG(ERROR) << "pthread_setname_np";
}