From fc6a9673c8ec6e22565bb5a837f33b845e5127ce Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 23 Jan 2012 21:28:30 +0100 Subject: [PATCH] dgram: make setBroadcast() conform to v0.4 API - don't return a value --- lib/dgram.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/dgram.js b/lib/dgram.js index 4166b02..2e8071c 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -223,11 +223,9 @@ Socket.prototype.address = function() { Socket.prototype.setBroadcast = function(arg) { - if (this._handle.setBroadcast((arg) ? 1 : 0) == -1) { - throw errnoException(errno, 'setBroadcast'); + if (this._handle.setBroadcast((arg) ? 1 : 0)) { + throw errnoException(errno, 'setBroadcast'); } - - return true; }; -- 2.7.4