rc-update: remove reference to PATH_MAX

This commit is contained in:
William Hubbs 2018-02-15 12:23:39 -06:00
parent 7b4879cb72
commit 9e14b35da8

View File

@ -166,7 +166,7 @@ show(RC_STRINGLIST *runlevels, bool verbose)
RC_STRING *runlevel; RC_STRING *runlevel;
RC_STRINGLIST *in; RC_STRINGLIST *in;
bool inone; bool inone;
char buffer[PATH_MAX]; char *buffer = NULL;
size_t l; size_t l;
rc_stringlist_sort(&services); rc_stringlist_sort(&services);
@ -182,9 +182,11 @@ show(RC_STRINGLIST *runlevels, bool verbose)
inone = true; inone = true;
} else { } else {
l = strlen(runlevel->value); l = strlen(runlevel->value);
buffer = xmalloc(l+1);
memset (buffer, ' ', l); memset (buffer, ' ', l);
buffer[l] = 0; buffer[l] = 0;
rc_stringlist_add (in, buffer); rc_stringlist_add (in, buffer);
free(buffer);
} }
} }