From f5541ddea30a023efa682383e19663d82f8cd83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 12 Feb 2021 20:59:38 +0100 Subject: [PATCH] src: fix ETW_WRITE_EMPTY_EVENT macro A comment was written before the last line, hiding a check. PR-URL: https://github.com/nodejs/node/pull/37334 Reviewed-By: James M Snell --- src/node_win32_etw_provider-inl.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/node_win32_etw_provider-inl.h b/src/node_win32_etw_provider-inl.h index a7846f413a204c..9238ea22a3a179 100644 --- a/src/node_win32_etw_provider-inl.h +++ b/src/node_win32_etw_provider-inl.h @@ -111,13 +111,12 @@ extern int events_enabled; dataDescriptors); \ CHECK_EQ(status, ERROR_SUCCESS); -#define ETW_WRITE_EMPTY_EVENT(eventDescriptor) \ - DWORD status = event_write(node_provider, \ - &eventDescriptor, \ - 0, \ - NULL); // NOLINT (readability/null_usage) \ - CHECK_EQ(status, ERROR_SUCCESS); +// NOLINTNEXTLINE (readability/null_usage) +#define NULL_NOLINT NULL +#define ETW_WRITE_EMPTY_EVENT(eventDescriptor) \ + DWORD status = event_write(node_provider, &eventDescriptor, 0, NULL_NOLINT); \ + CHECK_EQ(status, ERROR_SUCCESS); void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req, node_dtrace_connection_t* conn, const char* remote, int port, @@ -271,6 +270,8 @@ void NODE_V8SYMBOL_ADD(LPCSTR symbol, } #undef SETSYMBUF +#undef NULL_NOLINT + bool NODE_HTTP_SERVER_REQUEST_ENABLED() { return events_enabled > 0; } bool NODE_HTTP_SERVER_RESPONSE_ENABLED() { return events_enabled > 0; }