Skip to content

Commit 369f05a

Browse files
committed
jshint niggles
1 parent 82335b1 commit 369f05a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
.PHONY: init test clean
1+
.PHONY: init test lint clean
22
test: init
33
mocha -R spec
44

5+
lint:
6+
jshint cfb.js
7+
58
init:
69
if [ ! -e test_files ]; then git clone https://github.com/Niggler/test_files; fi
710
cd test_files; make

cfb.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ for(j = 0; blob.l != 512; ) {
243243
var nsectors = Math.ceil((file.length - ssz)/ssz);
244244
var sectors = [];
245245
for(var i=1; i != nsectors; ++i) sectors[i-1] = file.slice(i*ssz,(i+1)*ssz);
246-
sectors[nsectors-1] = file.slice(nsectors*ssz)
246+
sectors[nsectors-1] = file.slice(nsectors*ssz);
247247

248248
/** Chase down the rest of the DIFAT chain to build a comprehensive list
249249
DIFAT chains by storing the next sector number as the last 32 bytes */
@@ -327,8 +327,8 @@ function read_directory(idx) {
327327
o.content = sector_list[o.start].data.slice(0,o.size);
328328
} catch(e) {
329329
o.start = o.start - 1;
330-
sector_list[o.start].name = o.name;
331-
o.content = sector_list[o.start].data.slice(0,o.size);
330+
sector_list[o.start].name = o.name;
331+
o.content = sector_list[o.start].data.slice(0,o.size);
332332
}
333333
prep_blob(o.content);
334334
} else {
@@ -373,7 +373,7 @@ function build_full_paths(Dir, pathobj, paths, patharr) {
373373
if(Dir[i].type === "unknown") continue;
374374
var j = dad[i];
375375
if(j === 0) paths[i] = paths[0] + "/" + paths[i];
376-
else while(j != 0) {
376+
else while(j !== 0) {
377377
paths[i] = paths[j] + "/" + paths[i];
378378
j = dad[j];
379379
}

0 commit comments

Comments
 (0)