1 Star 0 Fork 50

zhongling.h/systemd_1

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0198-journal-gateway-explicitly-declare-local-variables.patch 3.01 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:59 . import systemd-239-29.el8.src.rpm
From e020d3e72755fc8c25d33efad1b7322e42d8610b Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Wed, 27 Jun 2018 14:22:24 +0900
Subject: [PATCH] journal-gateway: explicitly declare local variables
Suggested by LGTM.
(cherry picked from commit c497e449f41774a36e01ae2cc2abade6133dffe1)
Resolves: #1705971
---
src/journal-remote/browse.html | 11 ++++++-----
1 file 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);
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhonglingh/systemd_1.git
git@gitee.com:zhonglingh/systemd_1.git
zhonglingh
systemd_1
systemd_1
a8

搜索帮助