Skip to content

Commit f115dfc

Browse files
committed
buffer: minor cleanup from rebase
PR-URL: #2003 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
1 parent 74772b4 commit f115dfc

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lib/internal/buffer_new.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -457,16 +457,7 @@ Buffer.prototype.write = function(string, offset, length, encoding) {
457457

458458
// XXX legacy write(string, encoding, offset, length) - remove in v0.13
459459
} else {
460-
if (!writeWarned) {
461-
if (process.throwDeprecation)
462-
throw new Error(writeMsg);
463-
else if (process.traceDeprecation)
464-
console.trace(writeMsg);
465-
else
466-
console.error(writeMsg);
467-
writeWarned = true;
468-
}
469-
460+
writeWarned = internalUtil.printDeprecationMessage(writeMsg, writeWarned);
470461
var swap = encoding;
471462
encoding = offset;
472463
offset = length >>> 0;

0 commit comments

Comments
 (0)