From 75036c0f12cf4e28f5bccc7db66ae52e13337bfc Mon Sep 17 00:00:00 2001 From: Saeed Maleki Date: Tue, 28 Mar 2023 00:50:59 +0000 Subject: [PATCH] typo fixes --- src/debug.cc | 13 ------------- src/include/debug.h | 1 - 2 files changed, 14 deletions(-) diff --git a/src/debug.cc b/src/debug.cc index 34cd677b..b705ba8e 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -66,10 +66,6 @@ void mscclppDebugInit() invert = 1; mscclppDebugSubsysEnv++; } - if (mscclppDebugSubsysEnv[0] == '^') { - invert = 1; - mscclppDebugSubsysEnv++; - } mscclppDebugMask = invert ? ~0ULL : 0ULL; char* mscclppDebugSubsys = strdup(mscclppDebugSubsysEnv); char* subsys = strtok(mscclppDebugSubsys, ","); @@ -103,10 +99,6 @@ void mscclppDebugInit() mscclppDebugMask &= ~mask; else mscclppDebugMask |= mask; - if (invert) - mscclppDebugMask &= ~mask; - else - mscclppDebugMask |= mask; } subsys = strtok(NULL, ","); } @@ -128,7 +120,6 @@ void mscclppDebugInit() char* dfn = debugFn; while (mscclppDebugFileEnv[c] != '\0' && c < PATH_MAX) { if (mscclppDebugFileEnv[c++] != '%') { - *dfn++ = mscclppDebugFileEnv[c - 1]; *dfn++ = mscclppDebugFileEnv[c - 1]; continue; } @@ -190,8 +181,6 @@ void mscclppDebugLog(mscclppDebugLogLevel level, unsigned long flags, const char } if (mscclppDebugLevel < level || ((flags & mscclppDebugMask) == 0)) return; - if (mscclppDebugLevel < level || ((flags & mscclppDebugMask) == 0)) - return; if (tid == -1) { tid = syscall(SYS_gettid); @@ -247,8 +236,6 @@ void mscclppSetThreadName(pthread_t thread, const char* fmt, ...) // pthread_setname_np is nonstandard GNU extension // needs the following feature test macro #ifdef _GNU_SOURCE - if (mscclppParamSetThreadName() != 1) - return; if (mscclppParamSetThreadName() != 1) return; char threadName[MSCCLPP_THREAD_NAMELEN]; diff --git a/src/include/debug.h b/src/include/debug.h index 039e99d3..dd548cbb 100644 --- a/src/include/debug.h +++ b/src/include/debug.h @@ -69,7 +69,6 @@ extern std::chrono::steady_clock::time_point mscclppEpoch; #define TRACE(...) #endif -void mscclppSetThreadName(pthread_t thread, const char* fmt, ...); void mscclppSetThreadName(pthread_t thread, const char* fmt, ...); #endif