From f04e67779c30feccff7a3d2f24b103d58d4423da Mon Sep 17 00:00:00 2001 From: Arvid Gerstmann Date: Sat, 14 Jul 2018 13:46:25 +0200 Subject: [PATCH] Fix some minor code style issues --- common/TracySystem.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/TracySystem.cpp b/common/TracySystem.cpp index 06398fa1..7cf961b7 100644 --- a/common/TracySystem.cpp +++ b/common/TracySystem.cpp @@ -148,17 +148,17 @@ const char* GetThreadName( uint64_t id ) # elif defined __linux__ int cs, fd; char path[32]; - int tid = (int)syscall( SYS_gettid ); - snprintf( path, sizeof(path), "/proc/self/task/%d/comm", tid ); + int tid = (int) syscall( SYS_gettid ); + snprintf( path, sizeof( path ), "/proc/self/task/%d/comm", tid ); sprintf( buf, "%" PRIu64, id ); pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, &cs ); - if ((fd = open(path, O_RDONLY)) > 0) { + if ( ( fd = open( path, O_RDONLY ) ) > 0) { int len = read( fd, buf, 255 ); - if (len > 0) + if ( len > 0 ) buf[len] = 0; - close(fd); + close( fd ); } - pthread_setcancelstate(cs, 0); + pthread_setcancelstate( cs, 0 ); return buf; # endif #endif