no useless return

This commit is contained in:
Fabian 2024-07-24 16:12:32 +02:00
parent 324f6199aa
commit fada8a0fab
5 changed files with 6 additions and 8 deletions

View file

@ -15,6 +15,7 @@ export default [
"catch": { "after": false },
} }],
"semi": "error",
"no-useless-return": "error",
"eqeqeq": "error",
//"no-var": "error",
"radix": "error",

View file

@ -237,7 +237,6 @@ Virtio9p.prototype.BuildReply = function(id, tag, payloadsize) {
//for(var i=0; i<payload.length; i++)
// this.replybuffer[7+i] = payload[i];
this.replybuffersize = payloadsize+7;
return;
};
Virtio9p.prototype.SendError = function (tag, errormsg, errorcode) {

View file

@ -1264,13 +1264,11 @@ FS.prototype.DeleteNode = function(path) {
if((this.inodes[ids.id].mode&S_IFMT) === S_IFREG){
const ret = this.Unlink(ids.parentid, ids.name);
dbg_assert(ret === 0, "Filesystem DeleteNode failed with error code: " + (-ret));
return;
}
if((this.inodes[ids.id].mode&S_IFMT) === S_IFDIR){
else if((this.inodes[ids.id].mode&S_IFMT) === S_IFDIR){
this.RecursiveDelete(path);
const ret = this.Unlink(ids.parentid, ids.name);
dbg_assert(ret === 0, "Filesystem DeleteNode failed with error code: " + (-ret));
return;
}
};

View file

@ -1051,7 +1051,6 @@ TCPConnection.prototype.connect = function() {
syn: true,
};
this.net.receive(make_packet(reply));
return;
};
TCPConnection.prototype.accept = function(packet) {
@ -1078,7 +1077,6 @@ TCPConnection.prototype.accept = function(packet) {
ack: true
};
this.net.receive(make_packet(reply));
return;
};
TCPConnection.prototype.process = function(packet) {

View file

@ -1589,9 +1589,11 @@ register_fm_write([0x05], function(bits, register, address)
{
// No registers documented here.
this.fm_default_write(bits, register, address);
return;
}
// OPL3 Mode Enable
else
{
// OPL3 Mode Enable
}
});
register_fm_write([0x08], function(bits, register, address)