lib: change == to === in linkedlist

Also removed a TODO comment that is no longer viable and left a note
about the potentially confusing property naming convention for future
readers.

PR-URL: https://github.com/nodejs/node/pull/9362
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
jedireza 2016-10-29 15:54:27 -07:00 committed by Roman Reiss
parent e658f5b066
commit 62d8134c50
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443

View File

@ -16,7 +16,7 @@ exports.create = create;
// show the most idle item
function peek(list) {
if (list._idlePrev == list) return null;
if (list._idlePrev === list) return null;
return list._idlePrev;
}
exports.peek = peek;
@ -54,7 +54,7 @@ function append(list, item) {
}
// items are linked with _idleNext -> (older) and _idlePrev -> (newer)
// TODO: swap the linkage to match the intuitive older items at "prev"
// Note: This linkage (next being older) may seem counter-intuitive at first.
item._idleNext = list._idleNext;
item._idlePrev = list;