Skip to content

dgram: remove a needless instanceof Buffer check #4301

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from

Conversation

ronkorving
Copy link
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
Contributor

cjihrig commented Dec 16, 2015

LGTM

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

mscdex commented Dec 16, 2015

LGTM

1 similar comment
@silverwind
Copy link
Contributor

LGTM

@silverwind
Copy link
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
Contributor

Thanks! Landed in 4b267df.

@silverwind silverwind closed this Dec 16, 2015
@ronkorving
Copy link
Contributor Author

That was fast :) Thanks.

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

Well, that was easy to review 😉.

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

@ronkorving ronkorving changed the title udp: remove a needless instanceof Buffer check dgram: remove a needless instanceof Buffer check Dec 16, 2015
@ronkorving
Copy link
Contributor Author

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

@silverwind
Copy link
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
@rvagg rvagg 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>
@MylesBorins MylesBorins 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>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
dgram Issues and PRs related to the dgram subsystem / UDP.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants