Skip to content

Commit f5541dd

Browse files
committed
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>
1 parent 6b1052d commit f5541dd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/node_win32_etw_provider-inl.h

+7-6
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,12 @@ extern int events_enabled;
111111
dataDescriptors); \
112112
CHECK_EQ(status, ERROR_SUCCESS);
113113

114-
#define ETW_WRITE_EMPTY_EVENT(eventDescriptor) \
115-
DWORD status = event_write(node_provider, \
116-
&eventDescriptor, \
117-
0, \
118-
NULL); // NOLINT (readability/null_usage) \
119-
CHECK_EQ(status, ERROR_SUCCESS);
114+
// NOLINTNEXTLINE (readability/null_usage)
115+
#define NULL_NOLINT NULL
120116

117+
#define ETW_WRITE_EMPTY_EVENT(eventDescriptor) \
118+
DWORD status = event_write(node_provider, &eventDescriptor, 0, NULL_NOLINT); \
119+
CHECK_EQ(status, ERROR_SUCCESS);
121120

122121
void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req,
123122
node_dtrace_connection_t* conn, const char* remote, int port,
@@ -271,6 +270,8 @@ void NODE_V8SYMBOL_ADD(LPCSTR symbol,
271270
}
272271
#undef SETSYMBUF
273272

273+
#undef NULL_NOLINT
274+
274275

275276
bool NODE_HTTP_SERVER_REQUEST_ENABLED() { return events_enabled > 0; }
276277
bool NODE_HTTP_SERVER_RESPONSE_ENABLED() { return events_enabled > 0; }

0 commit comments

Comments
 (0)