GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: reduce variable scope in stream_base.cc · nodejs/node@4d761d4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • stream_base.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/stream_base.cc‎

Copy file name to clipboardExpand all lines: src/stream_base.cc
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ int StreamBase::WriteString(const FunctionCallbackInfo<Value>& args) {
209209
if (args[2]->IsObject())
210210
send_handle_obj = args[2].As<Object>();
211211

212-
int err;
213-
214212
// Compute the size of the storage that the string will be flattened into.
215213
// For UTF8 strings that are very long, go ahead and take the hit for
216214
// computing their actual size, rather than tripling the storage.
@@ -243,7 +241,7 @@ int StreamBase::WriteString(const FunctionCallbackInfo<Value>& args) {
243241

244242
uv_buf_t* bufs = &buf;
245243
size_t count = 1;
246-
err = DoTryWrite(&bufs, &count);
244+
const int err = DoTryWrite(&bufs, &count);
247245
// Keep track of the bytes written here, because we're taking a shortcut
248246
// by using `DoTryWrite()` directly instead of using the utilities
249247
// provided by `Write()`.

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.