Commit 0f944ab3 authored by Сковорода Никита Андреевич's avatar Сковорода Никита Андреевич Committed by James M Snell
Browse files

dgram: use Buffer.alloc(0) for zero-size buffers

There is no difference between alloc(0) and allocUnsafe(0), so there is
no reason to confuse anyone reading the code with an additional call to
allocUnsafe.

PR-URL: https://github.com/nodejs/node/pull/8751


Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarIlkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent b88612d1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment