don't check the return value of execvp() for failure to call err().

assume if it returns at all something has failed.
This commit is contained in:
mrg 2019-02-01 09:06:07 +00:00
parent 2235c7e9bc
commit 8dec05958d
3 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fstest_nfs.c,v 1.9 2011/02/28 21:08:46 pooka Exp $ */
/* $NetBSD: fstest_nfs.c,v 1.10 2019/02/01 09:06:07 mrg Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@ -113,8 +113,8 @@ donewfs(const atf_tc_t *tc, void **argp,
close(pipes[0]);
if (dup2(pipes[1], 3) == -1)
err(1, "dup2");
if (execvp(nfsdargv[0], nfsdargv) == -1)
err(1, "execvp");
execvp(nfsdargv[0], nfsdargv);
err(1, "execvp");
case -1:
return errno;
default:

View File

@ -1,4 +1,4 @@
/* $NetBSD: fstest_puffs.c,v 1.11 2013/09/09 19:47:38 pooka Exp $ */
/* $NetBSD: fstest_puffs.c,v 1.12 2019/02/01 09:06:07 mrg Exp $ */
/*
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@ -277,8 +277,8 @@ donewfs(const atf_tc_t *tc, void **argp,
if (setenv("PUFFS_COMFD", comfd, 1) == -1)
return errno;
if (execvp(theargv[0], theargv) == -1)
return errno;
execvp(theargv[0], theargv);
return errno;
case -1:
return errno;
default:

View File

@ -1,4 +1,4 @@
/* $NetBSD: rump_syspuffs.c,v 1.12 2011/08/31 13:32:39 joerg Exp $ */
/* $NetBSD: rump_syspuffs.c,v 1.13 2019/02/01 09:06:07 mrg Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@ -113,8 +113,8 @@ mount_syspuffs_parseargs(int argc, char *argv[],
err(1, "setenv");
argv++;
if (execvp(argv[0], argv) == -1)
err(1, "execvp");
(void)execvp(argv[0], argv);
err(1, "execvp");
/*NOTREACHED*/
case -1:
err(1, "fork");