Skip to content

Commit

Permalink
src: fix ETW_WRITE_EMPTY_EVENT macro
Browse files Browse the repository at this point in the history
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 f5541dd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/node_win32_etw_provider-inl.h
Expand Up @@ -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,
Expand Down Expand Up @@ -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; }
Expand Down

0 comments on commit f5541dd

Please sign in to comment.