1 Star 0 Fork 49

happy_orange/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0137-format-table-never-try-to-reuse-cells-that-have-colo.patch 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:59 . import systemd-239-29.el8.src.rpm
From a064e883c7cc28b8d561a7fea56b139d8e7d2286 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 3 Dec 2018 21:39:39 +0100
Subject: [PATCH] format-table: never try to reuse cells that have
color/url/uppercase set
The table cell reusing code is supposed to be an internal memory
optimization, and not more. This means behaviour should be the same as
if we wouldn't reuse cells.
(cherry picked from commit 94a80afed42a8b36d69a229bf44ba690f8f59a78)
Related: #1689832
---
src/basic/format-table.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/basic/format-table.c b/src/basic/format-table.c
index fe2201ee5f..844b92f41c 100644
--- a/src/basic/format-table.c
+++ b/src/basic/format-table.c
@@ -286,6 +286,14 @@ static bool table_data_matches(
if (d->ellipsize_percent != ellipsize_percent)
return false;
+ /* If a color/url/uppercase flag is set, refuse to merge */
+ if (d->color)
+ return false;
+ if (d->url)
+ return false;
+ if (d->uppercase)
+ return false;
+
k = table_data_size(type, data);
l = table_data_size(d->type, d->data);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/happy_orange/systemd.git
git@gitee.com:happy_orange/systemd.git
happy_orange
systemd
systemd
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385