summaryrefslogtreecommitdiff
path: root/libbb/vfork_daemon_rexec.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-12-26 10:42:51 +0000
committerDenis Vlasenko2006-12-26 10:42:51 +0000
commitbf0a201008671f81c107de72c026b1b84967561d (patch)
treeaf74820b70fa27929fe218c95822c20651b60637 /libbb/vfork_daemon_rexec.c
parent5dd7ef0f37373e397a7160cb431a32ae57f9f7d9 (diff)
downloadbusybox-bf0a201008671f81c107de72c026b1b84967561d.zip
busybox-bf0a201008671f81c107de72c026b1b84967561d.tar.gz
style fixes
last xcalloc replaced by xzalloc
Diffstat (limited to 'libbb/vfork_daemon_rexec.c')
-rw-r--r--libbb/vfork_daemon_rexec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c
index ebd32f8..81ae126 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -15,13 +15,9 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
#include <paths.h>
#include "libbb.h"
-
#ifdef BB_NOMMU
void vfork_daemon_rexec(int nochdir, int noclose,
int argc, char **argv, char *foreground_opt)
@@ -43,9 +39,9 @@ void vfork_daemon_rexec(int nochdir, int noclose,
close(fd);
}
- vfork_args = xcalloc(sizeof(char *), argc + 3);
+ vfork_args = xzalloc(sizeof(char *) * (argc + 3));
vfork_args[a++] = CONFIG_BUSYBOX_EXEC_PATH;
- while(*argv) {
+ while (*argv) {
vfork_args[a++] = *argv;
argv++;
}