4bff0a
From e020d3e72755fc8c25d33efad1b7322e42d8610b Mon Sep 17 00:00:00 2001
4bff0a
From: Yu Watanabe <watanabe.yu+github@gmail.com>
4bff0a
Date: Wed, 27 Jun 2018 14:22:24 +0900
4bff0a
Subject: [PATCH] journal-gateway: explicitly declare local variables
4bff0a
4bff0a
Suggested by LGTM.
4bff0a
4bff0a
(cherry picked from commit c497e449f41774a36e01ae2cc2abade6133dffe1)
4bff0a
4bff0a
Resolves: #1705971
4bff0a
---
4bff0a
 src/journal-remote/browse.html | 11 ++++++-----
4bff0a
 1 file changed, 6 insertions(+), 5 deletions(-)
4bff0a
4bff0a
diff --git a/src/journal-remote/browse.html b/src/journal-remote/browse.html
4bff0a
index 32848c7673..9f519adbd6 100644
4bff0a
--- a/src/journal-remote/browse.html
4bff0a
+++ b/src/journal-remote/browse.html
4bff0a
@@ -304,7 +304,6 @@
4bff0a
                         var buf = '';
4bff0a
 
4bff0a
                         for (i in l) {
4bff0a
-
4bff0a
                                 if (l[i] == '')
4bff0a
                                         continue;
4bff0a
 
4bff0a
@@ -322,6 +321,7 @@
4bff0a
                                 else
4bff0a
                                         priority = 6;
4bff0a
 
4bff0a
+                                var clazz;
4bff0a
                                 if (priority <= 3)
4bff0a
                                         clazz = "message-error";
4bff0a
                                 else if (priority <= 5)
4bff0a
@@ -388,7 +388,7 @@
4bff0a
                         var d = JSON.parse(event.currentTarget.responseText);
4bff0a
 
4bff0a
                         document.getElementById("diventry").style.display = "block";
4bff0a
-                        entry = document.getElementById("tableentry");
4bff0a
+                        var entry = document.getElementById("tableentry");
4bff0a
 
4bff0a
                         var buf = "";
4bff0a
                         for (var key in d) {
4bff0a
@@ -455,7 +455,7 @@
4bff0a
                                 (event.currentTarget.status != 200 && event.currentTarget.status != 0))
4bff0a
                                 return;
4bff0a
 
4bff0a
-                        f = document.getElementById("filter");
4bff0a
+                        var f = document.getElementById("filter");
4bff0a
 
4bff0a
                         var l = event.currentTarget.responseText.split('\n');
4bff0a
                         var buf = '<option>No filter</option>';
4bff0a
@@ -511,11 +511,12 @@
4bff0a
                 }
4bff0a
 
4bff0a
                 function initFilter() {
4bff0a
-                        f = document.getElementById("filter");
4bff0a
+                        var f = document.getElementById("filter");
4bff0a
 
4bff0a
                         var buf = '<option>No filter</option>';
4bff0a
 
4bff0a
                         var filter = localStorage["filter"];
4bff0a
+                        var j;
4bff0a
                         if (filter != null && filter != "") {
4bff0a
                                 buf += '<option value="' + escape(filter) + '">' + escapeHTML(filter) + '</option>';
4bff0a
                                 j = 1;
4bff0a
@@ -529,7 +530,7 @@
4bff0a
                 function installHandlers() {
4bff0a
                         document.onkeyup = onKeyUp;
4bff0a
 
4bff0a
-                        logs = document.getElementById("divlogs");
4bff0a
+                        var logs = document.getElementById("divlogs");
4bff0a
                         logs.addEventListener("mousewheel", onMouseWheel, false);
4bff0a
                         logs.addEventListener("DOMMouseScroll", onMouseWheel, false);
4bff0a
                 }