From owner-svn-src-user@freebsd.org Wed Feb 24 12:37:37 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EE6CAB2AEF for ; Wed, 24 Feb 2016 12:37:37 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7F491D26; Wed, 24 Feb 2016 12:37:36 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1OCbZAR007670; Wed, 24 Feb 2016 12:37:35 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1OCbZYB007669; Wed, 24 Feb 2016 12:37:35 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201602241237.u1OCbZYB007669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Wed, 24 Feb 2016 12:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r295968 - user/pho/stress2/testcases/run X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2016 12:37:37 -0000 Author: pho Date: Wed Feb 24 12:37:35 2016 New Revision: 295968 URL: https://svnweb.freebsd.org/changeset/base/295968 Log: Handle null arguments. While here order the include files. Sponsored by: EMC / Isilon Storage Division Modified: user/pho/stress2/testcases/run/run.c Modified: user/pho/stress2/testcases/run/run.c ============================================================================== --- user/pho/stress2/testcases/run/run.c Wed Feb 24 12:28:49 2016 (r295967) +++ user/pho/stress2/testcases/run/run.c Wed Feb 24 12:37:35 2016 (r295968) @@ -30,14 +30,15 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include #include #include + #include +#include +#include +#include +#include +#include #include "stress.h" @@ -105,6 +106,9 @@ test(void) fflush(stdout); for (i = 0; i < op->argc; i++) { + r[i] = 0; + if (op->argv[i][0] == 0) + continue; if ((r[i] = fork()) == 0) { snprintf(fullpath, sizeof(fullpath), "%s/%s", home, op->argv[i]);