openrc-run: clean up a compiler warning

This commit is contained in:
William Hubbs 2018-02-21 18:15:35 -06:00
parent e275da84de
commit 71aad16256

View File

@ -1151,7 +1151,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
lnk = xmalloc(4096); lnk = xmalloc(4096);
memset(lnk, 0, sizeof(lnk)); memset(lnk, 0, 4096);
if (readlink(argv[1], lnk, sizeof(lnk)-1)) { if (readlink(argv[1], lnk, sizeof(lnk)-1)) {
dir = dirname(path); dir = dirname(path);
if (strchr(lnk, '/')) { if (strchr(lnk, '/')) {