Skip to content

dgram: remove a needless instanceof Buffer check - #4301

Closed
ronkorving wants to merge 1 commit into
nodejs:masterfrom
ronkorving:udp-type-check
Closed

dgram: remove a needless instanceof Buffer check#4301
ronkorving wants to merge 1 commit into
nodejs:masterfrom
ronkorving:udp-type-check

Conversation

@ronkorving

Copy link
Copy Markdown
Contributor

When a string is passed to udpsock.send, it is automatically converted to a Buffer. In that case, it is no longer needed to test whether or not the argument is a Buffer.

When a string is passed to udpsock.send, it is automatically
converted to a Buffer. In that case, it is no longer needed
to test whether or not the argument is a Buffer or not.
@cjihrig

Copy link
Copy Markdown
Contributor

LGTM

@mscdexmscdex added the dgram Issues and PRs related to the dgram subsystem / UDP. label Dec 16, 2015
@mscdex

Copy link
Copy Markdown
Contributor

LGTM

1 similar comment
@silverwind

Copy link
Copy Markdown
Contributor

LGTM

@silverwind

Copy link
Copy Markdown
Contributor

silverwind pushed a commit that referenced this pull request Dec 16, 2015
When a string is passed to udpsock.send, it is automatically
converted to a Buffer. In that case, it is no longer needed
to test whether or not the argument is a Buffer or not.
PR-URL: #4301
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
@silverwind

Copy link
Copy Markdown
Contributor

Thanks! Landed in 4b267df.

@ronkorving

Copy link
Copy Markdown
ContributorAuthor

That was fast :) Thanks.

@ronkorving
ronkorving deleted the udp-type-check branch December 16, 2015 05:56
@silverwind

Copy link
Copy Markdown
Contributor

Well, that was easy to review 😉.

Oh, and I noticed the module name should have been dgram, but that's rather minor.

@ronkorvingronkorving changed the title udp: remove a needless instanceof Buffer checkdgram: remove a needless instanceof Buffer checkDec 16, 2015
@ronkorving

Copy link
Copy Markdown
ContributorAuthor

Too late to change the commit log I guess, but I renamed the PR.

@silverwind

Copy link
Copy Markdown
Contributor

Yeah, not going to force-push for something negligible like that 😉.

cjihrig pushed a commit that referenced this pull request Dec 16, 2015
When a string is passed to udpsock.send, it is automatically
converted to a Buffer. In that case, it is no longer needed
to test whether or not the argument is a Buffer or not.
PR-URL: #4301
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
Conflicts:
lib/dgram.js
@rvaggrvagg mentioned this pull request Dec 17, 2015
MylesBorins pushed a commit that referenced this pull request Dec 30, 2015
When a string is passed to udpsock.send, it is automatically
converted to a Buffer. In that case, it is no longer needed
to test whether or not the argument is a Buffer or not.
PR-URL: #4301
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Jan 19, 2016
When a string is passed to udpsock.send, it is automatically
converted to a Buffer. In that case, it is no longer needed
to test whether or not the argument is a Buffer or not.
PR-URL: #4301
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
@MylesBorinsMylesBorins mentioned this pull request Jan 19, 2016
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
When a string is passed to udpsock.send, it is automatically
converted to a Buffer. In that case, it is no longer needed
to test whether or not the argument is a Buffer or not.
PR-URL: nodejs#4301
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dgramIssues and PRs related to the dgram subsystem / UDP.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@ronkorving@cjihrig@mscdex@silverwind@jasnell@MylesBorins