Skip to content
Permalink
Browse files
src: fix ETW_WRITE_EMPTY_EVENT macro
A comment was written before the last line, hiding a check.

PR-URL: #37334
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
targos committed Jun 11, 2021
1 parent 6b1052d commit f5541ddea30a023efa682383e19663d82f8cd83a
Showing with 7 additions and 6 deletions.
  1. +7 −6 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; }

0 comments on commit f5541dd

Please sign in to comment.