Skip to content

Commit 4fdb883

Browse files
ulmnavi-desu
authored andcommitted
libeinfo.c, functions.sh: Drop upper limit for EINFO_INDENT
_eindent() already limits the width, so the additional limit in eindent is not needed. It also prevented proper alignment of corresponding eindent and eoutdent calls when the limit was exceeded.
1 parent 4043ce6 commit 4fdb883

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

sh/functions.sh.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Allow any sh script to work with einfo functions and friends
22
# We also provide a few helpful functions for other programs to use
33

4-
# Copyright (c) 2007-2015 The OpenRC Authors.
4+
# Copyright (c) 2007-2025 The OpenRC Authors.
55
# See the Authors file at the top-level directory of this distribution and
66
# https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
77
#
@@ -16,7 +16,6 @@ RC_GOT_FUNCTIONS="yes"
1616
eindent()
1717
{
1818
: $(( EINFO_INDENT = ${EINFO_INDENT:-0} + 2 ))
19-
[ "$EINFO_INDENT" -gt 40 ] && EINFO_INDENT=40
2019
export EINFO_INDENT
2120
}
2221

src/libeinfo/libeinfo.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/*
7-
* Copyright (c) 2007-2024 The OpenRC Authors.
7+
* Copyright (c) 2007-2025 The OpenRC Authors.
88
* See the Authors file at the top-level directory of this distribution and
99
* https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
1010
*
@@ -793,8 +793,6 @@ eindent(void)
793793
amount = 0;
794794
}
795795
amount += INDENT_WIDTH;
796-
if (amount > INDENT_MAX)
797-
amount = INDENT_MAX;
798796
xasprintf(&num, "%08d", amount);
799797
setenv("EINFO_INDENT", num, 1);
800798
free(num);

0 commit comments

Comments
 (0)