X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fexec.c;h=db093aad8d3a10da1d9a7206433aaa3ac29b2454;hp=8224d10b287c3a2de8079ffea0798ac57a723b7b;hb=fc2993befd2d9d6d9392cf109f033d0d6f421436;hpb=0b7cd83a5e6bac068ea83a88a5ddcfb07c09fbec diff --git a/src/exec.c b/src/exec.c index 8224d10b..db093aad 100644 --- a/src/exec.c +++ b/src/exec.c @@ -351,7 +351,6 @@ static int fork_child(program_list_t *pl, int *fd_in, int *fd_out, int fd_pipe_in[2] = {-1, -1}; int fd_pipe_out[2] = {-1, -1}; int fd_pipe_err[2] = {-1, -1}; - char errbuf[1024]; int status; int pid; @@ -380,7 +379,7 @@ static int fork_child(program_list_t *pl, int *fd_in, int *fd_out, status = getpwnam_r(pl->user, &sp, nambuf, sizeof(nambuf), &sp_ptr); if (status != 0) { ERROR("exec plugin: Failed to get user information for user ``%s'': %s", - pl->user, sstrerror(status, errbuf, sizeof(errbuf))); + pl->user, STRERROR(status)); goto failed; } @@ -415,7 +414,7 @@ static int fork_child(program_list_t *pl, int *fd_in, int *fd_out, if (status != 0) { ERROR("exec plugin: Failed to get group information " "for group ``%s'': %s", - pl->group, sstrerror(status, errbuf, sizeof(errbuf))); + pl->group, STRERROR(status)); goto failed; } if (gr_ptr == NULL) {