From owner-svn-src-head@FreeBSD.ORG Tue Sep 11 16:30:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B26D1065670; Tue, 11 Sep 2012 16:30:27 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26F3E8FC0A; Tue, 11 Sep 2012 16:30:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8BGURkR085125; Tue, 11 Sep 2012 16:30:27 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8BGUQDu085122; Tue, 11 Sep 2012 16:30:26 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201209111630.q8BGUQDu085122@svn.freebsd.org> From: Andrey Zonov Date: Tue, 11 Sep 2012 16:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240364 - head/usr.bin/truss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 16:30:27 -0000 Author: zont Date: Tue Sep 11 16:30:26 2012 New Revision: 240364 URL: http://svn.freebsd.org/changeset/base/240364 Log: - Remove unused variables. - Remove redundant return after err(3) call. Approved by: kib (mentor) Modified: head/usr.bin/truss/setup.c Modified: head/usr.bin/truss/setup.c ============================================================================== --- head/usr.bin/truss/setup.c Tue Sep 11 13:58:03 2012 (r240363) +++ head/usr.bin/truss/setup.c Tue Sep 11 16:30:26 2012 (r240364) @@ -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);