Skip to content

Commit 31aca30

Browse files
committed
fix codestyle
Signed-off-by: Marc Bestmann <[email protected]>
1 parent 9ae01f2 commit 31aca30

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/logging.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static const char * g_rcutils_logging_default_output_format =
9090
#ifdef _WIN32
9191
static DWORD g_original_console_mode = 0;
9292
static bool g_consol_mode_modified = false;
93-
#endif
93+
#endif
9494

9595
static rcutils_allocator_t g_rcutils_logging_allocator;
9696

@@ -423,19 +423,16 @@ static const char * copy_from_orig(
423423
#define ACTIVATE_VIRTUAL_TERMINAL_PROCESSING() \
424424
{ \
425425
HANDLE std_error_handle = GetStdHandle(STD_ERROR_HANDLE); \
426-
if (std_error_handle == INVALID_HANDLE_VALUE) \
427-
{ \
428-
RCUTILS_SET_ERROR_MSG("Could not get error handle to activating virtual terminal."); \
429-
return; \
426+
if (std_error_handle == INVALID_HANDLE_VALUE) { \
427+
RCUTILS_SET_ERROR_MSG("Could not get error handle to activating virtual terminal."); \
428+
return; \
430429
} \
431-
if (! GetConsoleMode(std_error_handle, &g_original_console_mode)) \
432-
{ \
430+
if (!GetConsoleMode(std_error_handle, &g_original_console_mode)) { \
433431
RCUTILS_SET_ERROR_MSG("Could not get consol mode to activating virtual terminal."); \
434432
return; \
435433
} \
436434
DWORD newDwMode = g_original_console_mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING; \
437-
if (! SetConsoleMode(std_error_handle, newDwMode)) \
438-
{ \
435+
if (!SetConsoleMode(std_error_handle, newDwMode)) { \
439436
RCUTILS_SET_ERROR_MSG("Could not set consol mode to activating virtual terminal."); \
440437
return; \
441438
} \
@@ -796,7 +793,7 @@ rcutils_ret_t rcutils_logging_shutdown(void)
796793
g_rcutils_logging_initialized = false;
797794

798795
#ifdef _WIN32
799-
if (g_consol_mode_modified){
796+
if (g_consol_mode_modified) {
800797
SetConsoleMode(GetStdHandle(STD_ERROR_HANDLE), g_original_console_mode);
801798
}
802799
#endif

0 commit comments

Comments
 (0)