diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-06-27 07:22:24 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-06-27 07:22:28 +0200 |
commit | c497e449f41774a36e01ae2cc2abade6133dffe1 (patch) | |
tree | 3c7dcd37528ff6d68b57a3940bd05cf11f0f6c95 /src/journal-remote | |
parent | sleep: fix printf format of fiemap fields (diff) | |
download | systemd-c497e449f41774a36e01ae2cc2abade6133dffe1.tar.xz systemd-c497e449f41774a36e01ae2cc2abade6133dffe1.zip |
journal-gateway: explicitly declare local variables
Suggested by LGTM.
Diffstat (limited to 'src/journal-remote')
-rw-r--r-- | src/journal-remote/browse.html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/journal-remote/browse.html b/src/journal-remote/browse.html index 32848c7673..9f519adbd6 100644 --- a/src/journal-remote/browse.html +++ b/src/journal-remote/browse.html @@ -304,7 +304,6 @@ var buf = ''; for (i in l) { - if (l[i] == '') continue; @@ -322,6 +321,7 @@ else priority = 6; + var clazz; if (priority <= 3) clazz = "message-error"; else if (priority <= 5) @@ -388,7 +388,7 @@ var d = JSON.parse(event.currentTarget.responseText); document.getElementById("diventry").style.display = "block"; - entry = document.getElementById("tableentry"); + var entry = document.getElementById("tableentry"); var buf = ""; for (var key in d) { @@ -455,7 +455,7 @@ (event.currentTarget.status != 200 && event.currentTarget.status != 0)) return; - f = document.getElementById("filter"); + var f = document.getElementById("filter"); var l = event.currentTarget.responseText.split('\n'); var buf = '<option>No filter</option>'; @@ -511,11 +511,12 @@ } function initFilter() { - f = document.getElementById("filter"); + var f = document.getElementById("filter"); var buf = '<option>No filter</option>'; var filter = localStorage["filter"]; + var j; if (filter != null && filter != "") { buf += '<option value="' + escape(filter) + '">' + escapeHTML(filter) + '</option>'; j = 1; @@ -529,7 +530,7 @@ function installHandlers() { document.onkeyup = onKeyUp; - logs = document.getElementById("divlogs"); + var logs = document.getElementById("divlogs"); logs.addEventListener("mousewheel", onMouseWheel, false); logs.addEventListener("DOMMouseScroll", onMouseWheel, false); } |