- Remove unused variables.

- Remove redundant return after err(3) call.

Approved by:	kib (mentor)
This commit is contained in:
Andrey Zonov 2012-09-11 16:30:26 +00:00
parent 8e5c2a044e
commit 310da894b7

View File

@ -70,7 +70,6 @@ int
setup_and_wait(char *command[]) setup_and_wait(char *command[])
{ {
pid_t pid; pid_t pid;
int waitval;
pid = vfork(); pid = vfork();
if (pid == -1) if (pid == -1)
@ -82,10 +81,8 @@ setup_and_wait(char *command[])
} }
/* Only in the parent here */ /* Only in the parent here */
if (waitpid(pid, &waitval, 0) < 0) { if (waitpid(pid, NULL, 0) < 0)
err(1, "unexpect stop in waitpid"); err(1, "unexpect stop in waitpid");
return 0;
}
child_pid = pid; child_pid = pid;
@ -101,7 +98,7 @@ setup_and_wait(char *command[])
int int
start_tracing(pid_t pid) start_tracing(pid_t pid)
{ {
int ret, retry, waitval; int ret, retry;
retry = 10; retry = 10;
do { do {
@ -112,7 +109,7 @@ start_tracing(pid_t pid)
err(1, "can not attach to target process"); err(1, "can not attach to target process");
child_pid = pid; child_pid = pid;
if (waitpid(pid, &waitval, 0) < 0) if (waitpid(pid, NULL, 0) < 0)
err(1, "Unexpect stop in waitpid"); err(1, "Unexpect stop in waitpid");
return (0); return (0);