Internal cleanup change.

PiperOrigin-RevId: 254254951
This commit is contained in:
A. Unique TensorFlower 2019-06-20 13:01:27 -07:00 committed by TensorFlower Gardener
parent 4443a53d76
commit 3e3b915613
2 changed files with 2 additions and 10 deletions

View File

@ -201,7 +201,7 @@ static string GetBinaryDir(bool strip_exe) {
HMODULE hModule = GetModuleHandle(NULL); HMODULE hModule = GetModuleHandle(NULL);
GetModuleFileName(hModule, exe_path, MAX_PATH); GetModuleFileName(hModule, exe_path, MAX_PATH);
#else #else
CHECK_ERR(readlink("/proc/self/exe", exe_path, sizeof(exe_path) - 1)); PCHECK(readlink("/proc/self/exe", exe_path, sizeof(exe_path) - 1) != -1);
#endif #endif
#endif #endif
// Make sure it's null-terminated: // Make sure it's null-terminated:

View File

@ -21,15 +21,7 @@ limitations under the License.
#if !defined(PLATFORM_GOOGLE) #if !defined(PLATFORM_GOOGLE)
// A CHECK() macro that lets you assert the success of a function that #define PCHECK(invocation) CHECK(invocation)
// returns -1 and sets errno in case of an error. E.g.
//
// CHECK_ERR(mkdir(path, 0700));
//
// or
//
// int fd = open(filename, flags); CHECK_ERR(fd) << ": open " << filename;
#define CHECK_ERR(invocation) CHECK((invocation) != -1) << #invocation
#endif #endif