Module Name:    src
Committed By:   mrg
Date:           Fri Feb  1 09:06:07 UTC 2019

Modified Files:
        src/tests/fs/common: fstest_nfs.c fstest_puffs.c
        src/usr.sbin/puffs/rump_syspuffs: rump_syspuffs.c

Log Message:
don't check the return value of execvp() for failure to call err().
assume if it returns at all something has failed.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/fs/common/fstest_nfs.c
cvs rdiff -u -r1.11 -r1.12 src/tests/fs/common/fstest_puffs.c
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/puffs/rump_syspuffs/rump_syspuffs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/common/fstest_nfs.c
diff -u src/tests/fs/common/fstest_nfs.c:1.9 src/tests/fs/common/fstest_nfs.c:1.10
--- src/tests/fs/common/fstest_nfs.c:1.9	Mon Feb 28 21:08:46 2011
+++ src/tests/fs/common/fstest_nfs.c	Fri Feb  1 09:06:07 2019
@@ -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:

Index: src/tests/fs/common/fstest_puffs.c
diff -u src/tests/fs/common/fstest_puffs.c:1.11 src/tests/fs/common/fstest_puffs.c:1.12
--- src/tests/fs/common/fstest_puffs.c:1.11	Mon Sep  9 19:47:38 2013
+++ src/tests/fs/common/fstest_puffs.c	Fri Feb  1 09:06:07 2019
@@ -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:

Index: src/usr.sbin/puffs/rump_syspuffs/rump_syspuffs.c
diff -u src/usr.sbin/puffs/rump_syspuffs/rump_syspuffs.c:1.12 src/usr.sbin/puffs/rump_syspuffs/rump_syspuffs.c:1.13
--- src/usr.sbin/puffs/rump_syspuffs/rump_syspuffs.c:1.12	Wed Aug 31 13:32:39 2011
+++ src/usr.sbin/puffs/rump_syspuffs/rump_syspuffs.c	Fri Feb  1 09:06:07 2019
@@ -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 
 			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");

Reply via email to