diff options
author | cjihrig <cjihrig@gmail.com> | 2019-02-06 16:54:46 +0300 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-02-08 17:11:10 +0300 |
commit | 4b4d46539d5e1dbb1b076e762136566eff3a2197 (patch) | |
tree | 43bc1d378cc95448e6ca8340db32416a4e3cff13 /src/node_report_utils.cc | |
parent | e49040bd11fb4138e64f7a13dfa0e191eb58c251 (diff) |
report: remove unnecessary case block scopes
PR-URL: https://github.com/nodejs/node/pull/25960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'src/node_report_utils.cc')
-rw-r--r-- | src/node_report_utils.cc | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/node_report_utils.cc b/src/node_report_utils.cc index c0812cc3ccb..181589b4416 100644 --- a/src/node_report_utils.cc +++ b/src/node_report_utils.cc @@ -16,14 +16,12 @@ void ReportEndpoints(uv_handle_t* h, std::ostringstream& out) { int rc = -1; switch (h->type) { - case UV_UDP: { + case UV_UDP: rc = uv_udp_getsockname(&(handle->udp), addr, &addr_size); break; - } - case UV_TCP: { + case UV_TCP: rc = uv_tcp_getsockname(&(handle->tcp), addr, &addr_size); break; - } default: break; } @@ -70,28 +68,24 @@ void ReportPath(uv_handle_t* h, std::ostringstream& out) { uv_any_handle* handle = reinterpret_cast<uv_any_handle*>(h); // First call to get required buffer size. switch (h->type) { - case UV_FS_EVENT: { + case UV_FS_EVENT: rc = uv_fs_event_getpath(&(handle->fs_event), buffer.data, &size); break; - } - case UV_FS_POLL: { + case UV_FS_POLL: rc = uv_fs_poll_getpath(&(handle->fs_poll), buffer.data, &size); break; - } default: break; } if (rc == UV_ENOBUFS) { buffer = MallocedBuffer<char>(size); switch (h->type) { - case UV_FS_EVENT: { + case UV_FS_EVENT: rc = uv_fs_event_getpath(&(handle->fs_event), buffer.data, &size); break; - } - case UV_FS_POLL: { + case UV_FS_POLL: rc = uv_fs_poll_getpath(&(handle->fs_poll), buffer.data, &size); break; - } default: break; } @@ -141,13 +135,12 @@ void WalkHandle(uv_handle_t* h, void* arg) { } break; } - case UV_SIGNAL: { + case UV_SIGNAL: // SIGWINCH is used by libuv so always appears. // See http://docs.libuv.org/en/v1.x/signal.html data << "signum: " << handle->signal.signum << " (" << node::signo_string(handle->signal.signum) << ")"; break; - } default: break; } |