Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
Date: Fri, 16 Feb 2018 20:07:46
Message-Id: 1518719019.9e14b35da8942bd8fa552363617c3415887f485f.williamh@OpenRC
1 commit: 9e14b35da8942bd8fa552363617c3415887f485f
2 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
3 AuthorDate: Thu Feb 15 18:23:39 2018 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 15 18:23:39 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=9e14b35d
7
8 rc-update: remove reference to PATH_MAX
9
10 src/rc/rc-update.c | 4 +++-
11 1 file changed, 3 insertions(+), 1 deletion(-)
12
13 diff --git a/src/rc/rc-update.c b/src/rc/rc-update.c
14 index 9bc1fe5b..abe40b88 100644
15 --- a/src/rc/rc-update.c
16 +++ b/src/rc/rc-update.c
17 @@ -166,7 +166,7 @@ show(RC_STRINGLIST *runlevels, bool verbose)
18 RC_STRING *runlevel;
19 RC_STRINGLIST *in;
20 bool inone;
21 - char buffer[PATH_MAX];
22 + char *buffer = NULL;
23 size_t l;
24
25 rc_stringlist_sort(&services);
26 @@ -182,9 +182,11 @@ show(RC_STRINGLIST *runlevels, bool verbose)
27 inone = true;
28 } else {
29 l = strlen(runlevel->value);
30 + buffer = xmalloc(l+1);
31 memset (buffer, ' ', l);
32 buffer[l] = 0;
33 rc_stringlist_add (in, buffer);
34 + free(buffer);
35 }
36 }