ws, remove cruft

This commit is contained in:
AJ ONeal 2017-10-06 19:27:37 -06:00
parent a5586f6b2c
commit 6b8a8664f8
1 changed files with 5 additions and 10 deletions

View File

@ -1,7 +1,6 @@
(function (exports) { (function (exports) {
'use strict'; 'use strict';
// NS name for the supplied domain. May be label, pointer or any combination // NS name for the supplied domain. May be label, pointer or any combination
exports.DNS_PACKER_TYPE_NS = function (ab, dv, total, record) { exports.DNS_PACKER_TYPE_NS = function (ab, dv, total, record) {
@ -9,15 +8,12 @@ exports.DNS_PACKER_TYPE_NS = function (ab, dv, total, record) {
throw new Error("no data on NS record"); throw new Error("no data on NS record");
} }
var nsLen = 0;
var rdLenIndex = total; var rdLenIndex = total;
total +=2; total +=2;
// RDATA // RDATA
// a sequence of labels // a sequence of labels
record.data.split('.').forEach(function (label) { record.data.split('.').forEach(function (label) {
nsLen += 1 + label.length;
dv.setUint8(total, label.length, false); dv.setUint8(total, label.length, false);
total += 1; total += 1;
@ -31,7 +27,6 @@ exports.DNS_PACKER_TYPE_NS = function (ab, dv, total, record) {
// RDLENGTH // RDLENGTH
dv.setUint16(rdLenIndex, record.data.length + 1, false); dv.setUint16(rdLenIndex, record.data.length + 1, false);
return total; return total;
}; };