aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-02-15 12:23:39 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-02-15 12:23:39 -0600
commit9e14b35da8942bd8fa552363617c3415887f485f (patch)
treea7136b42896c4312d53ef6bdcf76458d632b73d2 /src
parent7b4879cb72e907414b70553663bd9b6fda8d4408 (diff)
rc-update: remove reference to PATH_MAX
Diffstat (limited to 'src')
-rw-r--r--src/rc/rc-update.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rc/rc-update.c b/src/rc/rc-update.c
index 9bc1fe5b..abe40b88 100644
--- a/src/rc/rc-update.c
+++ b/src/rc/rc-update.c
@@ -166,7 +166,7 @@ show(RC_STRINGLIST *runlevels, bool verbose)
RC_STRING *runlevel;
RC_STRINGLIST *in;
bool inone;
- char buffer[PATH_MAX];
+ char *buffer = NULL;
size_t l;
rc_stringlist_sort(&services);
@@ -182,9 +182,11 @@ show(RC_STRINGLIST *runlevels, bool verbose)
inone = true;
} else {
l = strlen(runlevel->value);
+ buffer = xmalloc(l+1);
memset (buffer, ' ', l);
buffer[l] = 0;
rc_stringlist_add (in, buffer);
+ free(buffer);
}
}