summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorzont <zont@FreeBSD.org>2012-09-11 16:30:26 +0000
committerzont <zont@FreeBSD.org>2012-09-11 16:30:26 +0000
commitc2780232f100bd652c2208951281df97779b8f71 (patch)
tree800a95b79431e781345350615b0a4ae4e46b2b29 /usr.bin
parent1296b38e20b85cbf2f26f8b6056b3db82020ef43 (diff)
downloadFreeBSD-src-c2780232f100bd652c2208951281df97779b8f71.zip
FreeBSD-src-c2780232f100bd652c2208951281df97779b8f71.tar.gz
- Remove unused variables.
- Remove redundant return after err(3) call. Approved by: kib (mentor)
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/truss/setup.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/truss/setup.c b/usr.bin/truss/setup.c
index b4c61e1..1ae300a 100644
--- a/usr.bin/truss/setup.c
+++ b/usr.bin/truss/setup.c
@@ -70,7 +70,6 @@ int
setup_and_wait(char *command[])
{
pid_t pid;
- int waitval;
pid = vfork();
if (pid == -1)
@@ -82,10 +81,8 @@ setup_and_wait(char *command[])
}
/* Only in the parent here */
- if (waitpid(pid, &waitval, 0) < 0) {
+ if (waitpid(pid, NULL, 0) < 0)
err(1, "unexpect stop in waitpid");
- return 0;
- }
child_pid = pid;
@@ -101,7 +98,7 @@ setup_and_wait(char *command[])
int
start_tracing(pid_t pid)
{
- int ret, retry, waitval;
+ int ret, retry;
retry = 10;
do {
@@ -112,7 +109,7 @@ start_tracing(pid_t pid)
err(1, "can not attach to target process");
child_pid = pid;
- if (waitpid(pid, &waitval, 0) < 0)
+ if (waitpid(pid, NULL, 0) < 0)
err(1, "Unexpect stop in waitpid");
return (0);
OpenPOWER on IntegriCloud